Chromium Code Reviews| Index: chrome/common/nacl_types.h |
| diff --git a/chrome/common/nacl_types.h b/chrome/common/nacl_types.h |
| index af2eace9a99bc3882184f4168173fa12b810889d..2a2c1fa3cbe1b36dda502aee77f03ad150feab08 100644 |
| --- a/chrome/common/nacl_types.h |
| +++ b/chrome/common/nacl_types.h |
| @@ -2,7 +2,6 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| -// Handle passing definitions for NaCl |
| #ifndef CHROME_COMMON_NACL_TYPES_H_ |
| #define CHROME_COMMON_NACL_TYPES_H_ |
| #pragma once |
| @@ -18,18 +17,32 @@ |
| // TODO(gregoryd): add a Windows definition for base::FileDescriptor |
| namespace nacl { |
| + |
| #if defined(OS_WIN) |
| - // We assume that HANDLE always uses less than 32 bits |
| - typedef int FileDescriptor; |
| - inline HANDLE ToNativeHandle(const FileDescriptor& desc) { |
| - return reinterpret_cast<HANDLE>(desc); |
| - } |
| +// We assume that HANDLE always uses less than 32 bits |
| +typedef int FileDescriptor; |
| +inline HANDLE ToNativeHandle(const FileDescriptor& desc) { |
| + return reinterpret_cast<HANDLE>(desc); |
| +} |
| #elif defined(OS_POSIX) |
| - typedef base::FileDescriptor FileDescriptor; |
| - inline int ToNativeHandle(const FileDescriptor& desc) { |
| - return desc.fd; |
| - } |
| -#endif |
| +typedef base::FileDescriptor FileDescriptor; |
| +inline int ToNativeHandle(const FileDescriptor& desc) { |
| + return desc.fd; |
| } |
| +#endif |
| + |
| + |
| +// Parameters sent to the nacl process when we start it. |
|
Mark Seaborn
2012/04/06 23:13:50
'nacl' -> 'NaCl'
|
| +// |
| +// If you change this, you will also need to update the IPC serialization in |
| +// nacl_messages.h. |
| +struct NaClStartParams { |
| + std::vector<FileDescriptor> sockets; |
|
Mark Seaborn
2012/04/06 23:13:50
"sockets" -> "handles" (see other comment)
|
| + std::string validation_cache_key; |
| + std::string version; |
| + bool enable_exception_handling; |
| +}; |
| + |
| +} // namespace nacl |
| #endif // CHROME_COMMON_NACL_TYPES_H_ |