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

Unified Diff: ppapi/proxy/ppb_image_data_proxy.cc

Issue 1320783002: Make SharedMemoryHandle a class on windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ipc_global
Patch Set: Rebase. Created 5 years, 3 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 | « mojo/gles2/command_buffer_client_impl.cc ('k') | remoting/host/desktop_session_agent.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/ppb_image_data_proxy.cc
diff --git a/ppapi/proxy/ppb_image_data_proxy.cc b/ppapi/proxy/ppb_image_data_proxy.cc
index ed15bb6a1172afa4bd1c51bbc50593e6469b074c..5df31456df279f8001e4bfc7f52f7701af004768 100644
--- a/ppapi/proxy/ppb_image_data_proxy.cc
+++ b/ppapi/proxy/ppb_image_data_proxy.cc
@@ -375,7 +375,8 @@ PlatformImageData::PlatformImageData(const HostResource& resource,
ImageHandle handle)
: ImageData(resource, PPB_ImageData_Shared::PLATFORM, desc) {
#if defined(OS_WIN)
- transport_dib_.reset(TransportDIB::CreateWithHandle(handle));
+ transport_dib_.reset(TransportDIB::CreateWithHandle(
+ base::SharedMemoryHandle(handle, base::GetCurrentProcId())));
#else
transport_dib_.reset(TransportDIB::Map(handle));
#endif // defined(OS_WIN)
@@ -627,7 +628,11 @@ void PPB_ImageData_Proxy::OnHostMsgCreatePlatform(
desc, &image_handle, &byte_count);
result->SetHostResource(instance, resource);
if (resource) {
+#if defined(OS_WIN)
+ *result_image_handle = image_handle.GetHandle();
+#else
*result_image_handle = image_handle;
+#endif
} else {
*result_image_handle = PlatformImageData::NullHandle();
}
« no previous file with comments | « mojo/gles2/command_buffer_client_impl.cc ('k') | remoting/host/desktop_session_agent.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698