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

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

Issue 1426933002: Refactor Windows DPI Point, Rect, and Size for Multiple Monitor DPI Awareness (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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/legacy_render_widget_host_win.cc
diff --git a/content/browser/renderer_host/legacy_render_widget_host_win.cc b/content/browser/renderer_host/legacy_render_widget_host_win.cc
index bd0101d1007c5157d15e0cdc671b4cb422bc5f40..7d2182bbf022fd904072b8ea3103e3cb344b3265 100644
--- a/content/browser/renderer_host/legacy_render_widget_host_win.cc
+++ b/content/browser/renderer_host/legacy_render_widget_host_win.cc
@@ -18,8 +18,8 @@
#include "ui/base/win/internal_constants.h"
#include "ui/base/win/window_event_target.h"
#include "ui/gfx/geometry/rect.h"
+#include "ui/gfx/screen_win.h"
#include "ui/gfx/win/direct_manipulation.h"
-#include "ui/gfx/win/dpi.h"
namespace content {
@@ -83,7 +83,7 @@ void LegacyRenderWidgetHostHWND::Hide() {
}
void LegacyRenderWidgetHostHWND::SetBounds(const gfx::Rect& bounds) {
- gfx::Rect bounds_in_pixel = gfx::win::DIPToScreenRect(bounds);
+ gfx::Rect bounds_in_pixel = gfx::ScreenWin::DIPToClientRect(hwnd(), bounds);
::SetWindowPos(hwnd(), NULL, bounds_in_pixel.x(), bounds_in_pixel.y(),
bounds_in_pixel.width(), bounds_in_pixel.height(),
SWP_NOREDRAW);

Powered by Google App Engine
This is Rietveld 408576698