| Index: chrome/common/nacl_types.h
|
| diff --git a/chrome/common/nacl_types.h b/chrome/common/nacl_types.h
|
| index af2eace9a99bc3882184f4168173fa12b810889d..9596cc2b1de921c1c1e95eab74ede26c10022374 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,37 @@
|
|
|
| // 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.
|
| +//
|
| +// If you change this, you will also need to update the IPC serialization in
|
| +// nacl_messages.h.
|
| +struct NaClStartParams {
|
| + std::vector<FileDescriptor> handles;
|
| + std::string validation_cache_key;
|
| +
|
| + // Chrome version string. Sending the version string over IPC avoids linkage
|
| + // issues in cases where NaCl is not compiled into the main Chromium
|
| + // executable or DLL.
|
| + std::string version;
|
| +
|
| + bool enable_exception_handling;
|
| +};
|
| +
|
| +} // namespace nacl
|
|
|
| #endif // CHROME_COMMON_NACL_TYPES_H_
|
|
|