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

Unified Diff: content/browser/renderer_host/render_widget_host_view_base.cc

Issue 1679393002: Multiple DPI Tracking for ScreenWin (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CR Feedback EXCEPT rect_util Rename Created 4 years, 10 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/browser/renderer_host/render_widget_host_view_base.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_base.cc b/content/browser/renderer_host/render_widget_host_view_base.cc
index 780ced5af6016c192761f09227148b61bae5ff28..e9d18ac583b626aaaaddf1fe029c2ac3042163c3 100644
--- a/content/browser/renderer_host/render_widget_host_view_base.cc
+++ b/content/browser/renderer_host/render_widget_host_view_base.cc
@@ -31,7 +31,7 @@
#include "content/public/browser/child_process_data.h"
#include "content/public/common/content_switches.h"
#include "ui/gfx/gdi_util.h"
-#include "ui/gfx/win/dpi.h"
+#include "ui/gfx/screen_win.h"
#include "ui/gfx/win/hwnd_util.h"
#endif
@@ -151,7 +151,7 @@ BOOL CALLBACK PaintEnumChildProc(HWND hwnd, LPARAM lparam) {
return TRUE;
gfx::Rect* rect = reinterpret_cast<gfx::Rect*>(lparam);
- gfx::Rect rect_in_pixels = gfx::win::DIPToScreenRect(*rect);
+ gfx::Rect rect_in_pixels = gfx::ScreenWin::DIPToScreenRect(hwnd, *rect);
static UINT msg = RegisterWindowMessage(kPaintMessageName);
WPARAM wparam = MAKEWPARAM(rect_in_pixels.x(), rect_in_pixels.y());
lparam = MAKELPARAM(rect_in_pixels.width(), rect_in_pixels.height());
@@ -265,7 +265,8 @@ void RenderWidgetHostViewBase::MovePluginWindowsHelper(
#endif
if (move.rects_valid) {
- gfx::Rect clip_rect_in_pixel = gfx::win::DIPToScreenRect(move.clip_rect);
+ gfx::Rect clip_rect_in_pixel =
+ gfx::ScreenWin::DIPToScreenRect(window, move.clip_rect);
HRGN hrgn = ::CreateRectRgn(clip_rect_in_pixel.x(),
clip_rect_in_pixel.y(),
clip_rect_in_pixel.right(),
@@ -295,7 +296,7 @@ void RenderWidgetHostViewBase::MovePluginWindowsHelper(
}
gfx::Rect window_rect_in_pixel =
- gfx::win::DIPToScreenRect(move.window_rect);
+ gfx::ScreenWin::DIPToScreenRect(window, move.window_rect);
defer_window_pos_info = ::DeferWindowPos(defer_window_pos_info,
window, NULL,
window_rect_in_pixel.x(),
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_aura.cc ('k') | content/child/npapi/webplugin_delegate_impl_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698