Index: components/nacl/common/nacl_types.h |
diff --git a/components/nacl/common/nacl_types.h b/components/nacl/common/nacl_types.h |
index 6107dcaed3450035da7f031d7612bc3721f0d398..22df1d083f8ef5c56491888790fa16828973d4ba 100644 |
--- a/components/nacl/common/nacl_types.h |
+++ b/components/nacl/common/nacl_types.h |
@@ -16,29 +16,8 @@ |
#include "ipc/ipc_channel.h" |
#include "ipc/ipc_platform_file.h" |
-#if defined(OS_POSIX) |
-#include "base/file_descriptor_posix.h" |
-#endif |
- |
-#if defined(OS_WIN) |
-#include <windows.h> // for HANDLE |
-#endif |
- |
-// TODO(gregoryd): add a Windows definition for base::FileDescriptor |
namespace nacl { |
-#if defined(OS_WIN) |
-typedef HANDLE FileDescriptor; |
-inline HANDLE ToNativeHandle(const FileDescriptor& desc) { |
- return desc; |
-} |
-#elif defined(OS_POSIX) |
-typedef base::FileDescriptor FileDescriptor; |
-inline int ToNativeHandle(const FileDescriptor& desc) { |
- return desc.fd; |
-} |
-#endif |
- |
// We allocate a page of shared memory for sharing crash information from |
// trusted code in the NaCl process to the renderer. |
static const int kNaClCrashInfoShmemSize = 4096; |
@@ -74,7 +53,7 @@ struct NaClResourcePrefetchRequest { |
// a NaCl manifest file. |
struct NaClResourcePrefetchResult { |
NaClResourcePrefetchResult(); |
- NaClResourcePrefetchResult(IPC::PlatformFileForTransit file, |
+ NaClResourcePrefetchResult(const IPC::PlatformFileForTransit& file, |
const base::FilePath& file_path, |
const std::string& file_key); |
~NaClResourcePrefetchResult(); |
@@ -161,7 +140,7 @@ struct NaClLaunchParams { |
struct NaClLaunchResult { |
NaClLaunchResult(); |
NaClLaunchResult( |
- FileDescriptor imc_channel_handle, |
+ const IPC::PlatformFileForTransit& imc_channel_handle, |
const IPC::ChannelHandle& ppapi_ipc_channel_handle, |
const IPC::ChannelHandle& trusted_ipc_channel_handle, |
const IPC::ChannelHandle& manifest_service_ipc_channel_handle, |
@@ -171,7 +150,7 @@ struct NaClLaunchResult { |
~NaClLaunchResult(); |
// For plugin loader <-> renderer IMC communication. |
- FileDescriptor imc_channel_handle; |
+ IPC::PlatformFileForTransit imc_channel_handle; |
// For plugin <-> renderer PPAPI communication. |
IPC::ChannelHandle ppapi_ipc_channel_handle; |