Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(113)

Unified Diff: content/ppapi_plugin/ppapi_thread.cc

Issue 1154613006: Update pepper to not assume that SharedMemoryHandle is an int. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Replace unnecessary #includes with forward declarations. Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/ppapi_plugin/ppapi_thread.h ('k') | content/public/renderer/renderer_ppapi_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
}
« no previous file with comments | « content/ppapi_plugin/ppapi_thread.h ('k') | content/public/renderer/renderer_ppapi_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698