diff options
Diffstat (limited to 'ppapi/proxy/broker_dispatcher.cc')
-rw-r--r-- | ppapi/proxy/broker_dispatcher.cc | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/ppapi/proxy/broker_dispatcher.cc b/ppapi/proxy/broker_dispatcher.cc index 30cee18..c3f3b47 100644 --- a/ppapi/proxy/broker_dispatcher.cc +++ b/ppapi/proxy/broker_dispatcher.cc @@ -7,24 +7,11 @@ #include "base/sync_socket.h" #include "ppapi/c/pp_errors.h" #include "ppapi/proxy/ppapi_messages.h" +#include "ppapi/shared_impl/platform_file.h" namespace ppapi { namespace proxy { -namespace { - -int32_t PlatformFileToInt(base::PlatformFile handle) { -#if defined(OS_WIN) - return static_cast<int32_t>(reinterpret_cast<intptr_t>(handle)); -#elif defined(OS_POSIX) - return handle; -#else - #error Not implemented. -#endif -} - -} // namespace - BrokerDispatcher::BrokerDispatcher(base::ProcessHandle remote_process_handle, PP_ConnectInstance_Func connect_instance) : ProxyChannel(remote_process_handle), @@ -66,7 +53,8 @@ void BrokerDispatcher::OnMsgConnectToPlugin( IPC::PlatformFileForTransitToPlatformFile(handle); if (connect_instance_) { - *result = connect_instance_(instance, PlatformFileToInt(socket_handle)); + *result = connect_instance_(instance, + ppapi::PlatformFileToInt(socket_handle)); } else { *result = PP_ERROR_FAILED; // Close the handle since there is no other owner. |