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

Unified Diff: content/renderer/npapi/webplugin_delegate_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
Index: content/renderer/npapi/webplugin_delegate_proxy.cc
diff --git a/content/renderer/npapi/webplugin_delegate_proxy.cc b/content/renderer/npapi/webplugin_delegate_proxy.cc
index 22d2799625fc3198b73058ecdf8e097241601c26..edd39bdad7c29ccad1c3605b16415d9a5693f106 100644
--- a/content/renderer/npapi/webplugin_delegate_proxy.cc
+++ b/content/renderer/npapi/webplugin_delegate_proxy.cc
@@ -501,10 +501,7 @@ static void CopySharedMemoryHandleForMessage(
*handle_out = base::SharedMemory::DuplicateHandle(handle_in);
#elif defined(OS_WIN)
// On Windows we need to duplicate the handle for the plugin process.
- *handle_out = NULL;
- BrokerDuplicateHandle(handle_in, peer_pid, handle_out,
- FILE_MAP_READ | FILE_MAP_WRITE, 0);
- DCHECK(*handle_out != NULL);
+ BrokerDuplicateSharedMemoryHandle(handle_in, peer_pid, handle_out);
#else
#error Shared memory copy not implemented.
#endif
@@ -645,7 +642,8 @@ bool WebPluginDelegateProxy::CreateSharedBitmap(
#else
canvas->reset(skia::CreatePlatformCanvas(
plugin_rect_.width(), plugin_rect_.height(), true,
- (*memory)->shared_memory()->handle(), skia::RETURN_NULL_ON_FAILURE));
+ (*memory)->shared_memory()->handle().GetHandle(),
+ skia::RETURN_NULL_ON_FAILURE));
#endif
return !!canvas->get();
}

Powered by Google App Engine
This is Rietveld 408576698