summaryrefslogtreecommitdiffstats
path: root/ui/snapshot
diff options
context:
space:
mode:
authorrvargas <rvargas@chromium.org>2014-09-24 17:12:03 -0700
committerCommit bot <commit-bot@chromium.org>2014-09-25 00:12:16 +0000
commited1ea8590f9bfe2e734907758cce3ae8a32e7b91 (patch)
tree9336f47e9cce4874f3ccaa741c162aa580beb992 /ui/snapshot
parenta175a7c2191008c6a03e63c451525e1e7ef3c437 (diff)
downloadchromium_src-ed1ea8590f9bfe2e734907758cce3ae8a32e7b91.zip
chromium_src-ed1ea8590f9bfe2e734907758cce3ae8a32e7b91.tar.gz
chromium_src-ed1ea8590f9bfe2e734907758cce3ae8a32e7b91.tar.bz2
Remove implicit HANDLE conversions from ui.
BUG=416722 R=sky@chromium.org Review URL: https://codereview.chromium.org/606453002 Cr-Commit-Position: refs/heads/master@{#296585}
Diffstat (limited to 'ui/snapshot')
-rw-r--r--ui/snapshot/snapshot_win.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/ui/snapshot/snapshot_win.cc b/ui/snapshot/snapshot_win.cc
index 29a6be2..fff9705 100644
--- a/ui/snapshot/snapshot_win.cc
+++ b/ui/snapshot/snapshot_win.cc
@@ -56,18 +56,18 @@ bool GrabHwndSnapshot(HWND window_handle,
&hdr);
unsigned char *bit_ptr = NULL;
base::win::ScopedBitmap bitmap(
- CreateDIBSection(mem_hdc,
+ CreateDIBSection(mem_hdc.Get(),
reinterpret_cast<BITMAPINFO*>(&hdr),
DIB_RGB_COLORS,
reinterpret_cast<void **>(&bit_ptr),
NULL, 0));
- base::win::ScopedSelectObject select_bitmap(mem_hdc, bitmap);
+ base::win::ScopedSelectObject select_bitmap(mem_hdc.Get(), bitmap);
// Clear the bitmap to white (so that rounded corners on windows
// show up on a white background, and strangely-shaped windows
// look reasonable). Not capturing an alpha mask saves a
// bit of space.
- PatBlt(mem_hdc, 0, 0, snapshot_bounds.width(), snapshot_bounds.height(),
+ PatBlt(mem_hdc.Get(), 0, 0, snapshot_bounds.width(), snapshot_bounds.height(),
WHITENESS);
// Grab a copy of the window
// First, see if PrintWindow is defined (it's not in Windows 2000).
@@ -82,10 +82,11 @@ bool GrabHwndSnapshot(HWND window_handle,
// than nothing and will work fine in the average case (window is
// completely on screen). Always BitBlt when grabbing the whole screen.
if (snapshot_bounds.origin() == gfx::Point() && print_window && window_handle)
- (*print_window)(window_handle, mem_hdc, 0);
+ (*print_window)(window_handle, mem_hdc.Get(), 0);
else
- BitBlt(mem_hdc, 0, 0, snapshot_bounds.width(), snapshot_bounds.height(),
- window_hdc, snapshot_bounds.x(), snapshot_bounds.y(), SRCCOPY);
+ BitBlt(mem_hdc.Get(), 0, 0, snapshot_bounds.width(),
+ snapshot_bounds.height(), window_hdc, snapshot_bounds.x(),
+ snapshot_bounds.y(), SRCCOPY);
// We now have a copy of the window contents in a DIB, so
// encode it into a useful format for posting to the bug report