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

Unified Diff: ui/aura/remote_window_tree_host_win.cc

Issue 271543009: Send the device scale factor from Windows 8 ASH during initialization via the MetroViewerHostMsg_Se… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed tabs Created 6 years, 7 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
« no previous file with comments | « ui/aura/remote_window_tree_host_win.h ('k') | ui/base/win/dpi_setup.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/remote_window_tree_host_win.cc
diff --git a/ui/aura/remote_window_tree_host_win.cc b/ui/aura/remote_window_tree_host_win.cc
index 70412d33546cb81bf87b47e25d8fb223fe4d2c3a..31aa55121833b7b916605f380e11eb04e2f79272 100644
--- a/ui/aura/remote_window_tree_host_win.cc
+++ b/ui/aura/remote_window_tree_host_win.cc
@@ -183,8 +183,11 @@ bool RemoteWindowTreeHostWin::IsValid() {
return Instance()->remote_window_ != NULL;
}
-void RemoteWindowTreeHostWin::SetRemoteWindowHandle(HWND remote_window) {
+void RemoteWindowTreeHostWin::InitializeRemoteWindowAndScaleFactor(
+ HWND remote_window,
+ float device_scale) {
remote_window_ = remote_window;
+ gfx::InitDeviceScaleFactor(device_scale);
// Do not create compositor here, but in Connected() below.
// See http://crbug.com/330179 and http://crbug.com/334380.
}
@@ -489,7 +492,7 @@ void RemoteWindowTreeHostWin::OnTextInputClientUpdated(
}
gfx::Point PointFromNativeEvent(int32 x, int32 y) {
- static float scale_factor = gfx::GetModernUIScale();
+ static float scale_factor = gfx::GetDPIScale();
gfx::Point result( x * scale_factor, y * scale_factor);
return result;
}
« no previous file with comments | « ui/aura/remote_window_tree_host_win.h ('k') | ui/base/win/dpi_setup.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698