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

Unified Diff: ui/views/widget/desktop_aura/desktop_native_widget_aura.cc

Issue 1608733002: Remove ui/gfx/screen_type_delegate.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-4
Patch Set: and another rebase 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: ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
diff --git a/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
index 618d77449607e2a0d5878b299838f0acf951d633..f2c2706325e8b13310680e3efa0945de198cad39 100644
--- a/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
+++ b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
@@ -696,8 +696,9 @@ void DesktopNativeWidgetAura::SetBounds(const gfx::Rect& bounds) {
float scale = 1;
aura::Window* root = host_->window();
if (root) {
- scale = gfx::Screen::GetScreenFor(root)->
- GetDisplayNearestWindow(root).device_scale_factor();
+ scale = gfx::Screen::GetScreen()
+ ->GetDisplayNearestWindow(root)
+ .device_scale_factor();
}
gfx::Rect bounds_in_pixels =
gfx::ScaleToEnclosingRect(bounds, scale, scale);

Powered by Google App Engine
This is Rietveld 408576698