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

Unified Diff: ui/aura/window_tree_host.cc

Issue 2207043002: SetDeviceScaleFactorForTest Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: SetDeviceScaleFactorForTest Created 4 years, 4 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/window_event_dispatcher_unittest.cc ('k') | ui/display/display.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/window_tree_host.cc
diff --git a/ui/aura/window_tree_host.cc b/ui/aura/window_tree_host.cc
index d8f9940ceb4c12b278ffce05de5907ad666d1355..8a4535de42add1badfbfe89db1716d465800f49b 100644
--- a/ui/aura/window_tree_host.cc
+++ b/ui/aura/window_tree_host.cc
@@ -273,6 +273,12 @@ void WindowTreeHost::OnHostResized(const gfx::Size& new_size) {
gfx::Size adjusted_size(new_size);
adjusted_size.Enlarge(output_surface_padding_.width(),
output_surface_padding_.height());
+ display::Display display =
+ display::Screen::GetScreen()->GetDisplayNearestWindow(window());
+
+ LOG(ERROR) << "OnHostResized called:" << new_size.ToString()
+ << ", display=" << display.ToString();
+
// The compositor should have the same size as the native root window host.
// Get the latest scale from display because it might have been changed.
compositor_->SetScaleAndSize(GetDeviceScaleFactorFromDisplay(window()),
« no previous file with comments | « ui/aura/window_event_dispatcher_unittest.cc ('k') | ui/display/display.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698