summaryrefslogtreecommitdiffstats
path: root/content/plugin/webplugin_proxy.cc
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-28 23:33:12 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-28 23:33:12 +0000
commit453f57f0becc1da334668adb0ab9a42c032f85c4 (patch)
treeff3c2058f83724d9d51d296442f01f4309b38787 /content/plugin/webplugin_proxy.cc
parent0eba55ca2475f9d6b04492e0c93f560fc711283d (diff)
downloadchromium_src-453f57f0becc1da334668adb0ab9a42c032f85c4.zip
chromium_src-453f57f0becc1da334668adb0ab9a42c032f85c4.tar.gz
chromium_src-453f57f0becc1da334668adb0ab9a42c032f85c4.tar.bz2
Remove section_util_win since it had two functions that were used in three places. Also, all the other places in the code that use DuplicateHandle call it directly. If we want to have a wrapper around it, it should probably go into base and we should convert all users at the same time.
BUG=98716 Review URL: http://codereview.chromium.org/8729002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111813 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/plugin/webplugin_proxy.cc')
-rw-r--r--content/plugin/webplugin_proxy.cc13
1 files changed, 5 insertions, 8 deletions
diff --git a/content/plugin/webplugin_proxy.cc b/content/plugin/webplugin_proxy.cc
index c1b34c8..bd4a36d 100644
--- a/content/plugin/webplugin_proxy.cc
+++ b/content/plugin/webplugin_proxy.cc
@@ -31,11 +31,6 @@
#include "content/plugin/webplugin_accelerated_surface_proxy_mac.h"
#endif
-#if defined(OS_WIN)
-#include "content/common/section_util_win.h"
-#include "ui/gfx/gdi_util.h"
-#endif
-
#if defined(USE_X11)
#include "ui/base/x/x11_util_internal.h"
#endif
@@ -473,9 +468,11 @@ void WebPluginProxy::CreateCanvasFromHandle(
// Create a canvas that will reference the shared bits. We have to handle
// errors here since we're mapping a large amount of memory that may not fit
// in our address space, or go wrong in some other way.
- HANDLE section = chrome::GetSectionFromProcess(dib_handle,
- channel_->renderer_handle(),
- false);
+ HANDLE section;
+ DuplicateHandle(channel_->renderer_handle(), dib_handle, GetCurrentProcess(),
+ &section,
+ STANDARD_RIGHTS_REQUIRED | FILE_MAP_READ | FILE_MAP_WRITE,
+ FALSE, 0);
scoped_ptr<skia::PlatformCanvas> canvas(new skia::PlatformCanvas);
if (!canvas->initialize(
window_rect.width(),