Chromium Code Reviews| Index: content/ppapi_plugin/ppapi_thread.cc |
| diff --git a/content/ppapi_plugin/ppapi_thread.cc b/content/ppapi_plugin/ppapi_thread.cc |
| index a02b64dff5dc6de0232a97a13f53093b95317fdf..4694fe04485703b95ccad6f4824631f0a9789054 100644 |
| --- a/content/ppapi_plugin/ppapi_thread.cc |
| +++ b/content/ppapi_plugin/ppapi_thread.cc |
| @@ -199,6 +199,23 @@ IPC::PlatformFileForTransit PpapiThread::ShareHandleWithRemote( |
| return BrokerGetFileHandleForProcess(handle, peer_pid, should_close_source); |
| } |
| +base::SharedMemoryHandle PpapiThread::ShareSharedMemoryHandleWithRemote( |
| + const base::SharedMemoryHandle& handle, |
| + base::ProcessId remote_pid) { |
| + base::PlatformFile local_platform_file = |
| +#if defined(OS_POSIX) |
| + handle.fd; |
| +#elif defined(OS_WIN) |
| + reinterpret_cast<HANDLE>(static_cast<intptr_t>(handle)); |
|
erikchen
2015/06/02 00:28:37
Did another pass for nits. Removed an unnecessary
|
| +#else |
| +#error Not implemented. |
| +#endif |
| + IPC::PlatformFileForTransit remote_platform_file = |
| + PpapiThread::ShareHandleWithRemote(local_platform_file, remote_pid, |
| + false); |
| + return remote_platform_file; |
| +} |
| + |
| std::set<PP_Instance>* PpapiThread::GetGloballySeenInstanceIDSet() { |
| return &globally_seen_instance_ids_; |
| } |