summaryrefslogtreecommitdiffstats
path: root/content/ppapi_plugin
diff options
context:
space:
mode:
authorerikchen <erikchen@chromium.org>2015-09-25 15:34:31 -0700
committerCommit bot <commit-bot@chromium.org>2015-09-25 22:36:18 +0000
commit5ea2ab75db847e7506f4e9e6f6b370f65cc1bb39 (patch)
tree85a7fe3d9c8015204eacc8dbdae039fee4d631e8 /content/ppapi_plugin
parent997afddb1a38bba06bfd6f048b207434aebc967a (diff)
downloadchromium_src-5ea2ab75db847e7506f4e9e6f6b370f65cc1bb39.zip
chromium_src-5ea2ab75db847e7506f4e9e6f6b370f65cc1bb39.tar.gz
chromium_src-5ea2ab75db847e7506f4e9e6f6b370f65cc1bb39.tar.bz2
Make SharedMemoryHandle a class on windows.
This CL is intended to be a refactor and should not introduce any behavior changes. Previously, SharedMemoryhandle was typedefed to HANDLE. Making it a class allows us to add metainformation about the process in which the HANDLE is valid. This will be used in the future by Chrome's IPC system to automatically duplicate HANDLEs into their destination process. BUG=493414, 535028 Review URL: https://codereview.chromium.org/1320783002 Cr-Commit-Position: refs/heads/master@{#350932}
Diffstat (limited to 'content/ppapi_plugin')
-rw-r--r--content/ppapi_plugin/ppapi_thread.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/content/ppapi_plugin/ppapi_thread.cc b/content/ppapi_plugin/ppapi_thread.cc
index 4d89387..2200a75 100644
--- a/content/ppapi_plugin/ppapi_thread.cc
+++ b/content/ppapi_plugin/ppapi_thread.cc
@@ -208,7 +208,10 @@ base::SharedMemoryHandle PpapiThread::ShareSharedMemoryHandleWithRemote(
#if defined(OS_WIN)
if (peer_handle_.IsValid()) {
DCHECK(is_broker_);
- return IPC::GetFileHandleForProcess(handle, peer_handle_.Get(), false);
+ IPC::PlatformFileForTransit platform_file = IPC::GetFileHandleForProcess(
+ handle.GetHandle(), peer_handle_.Get(), false);
+ base::ProcessId pid = base::GetProcId(peer_handle_.Get());
+ return base::SharedMemoryHandle(platform_file, pid);
}
#endif