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

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: Fixed Other Unit Tests - Moved Inner Classes Outside Created 4 years, 11 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 9e2305747a52b64b0b44c015b167f698fd2ea6df..624584c2626516fcf6476c6390ec13a1c2851d0c 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