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

Unified Diff: ui/base/layout.cc

Issue 11030017: Add context to gfx::Screen calls in support of simultaneous desktop+ash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix new addition Created 8 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
« no previous file with comments | « ui/aura/window_unittest.cc ('k') | ui/gfx/screen.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/layout.cc
diff --git a/ui/base/layout.cc b/ui/base/layout.cc
index b496fb7ee87386766607147563e64c354b73c6e7..3d2538000ea97215e3aad2446d4dae9ac2779231 100644
--- a/ui/base/layout.cc
+++ b/ui/base/layout.cc
@@ -151,8 +151,9 @@ void SetSupportedScaleFactors(
#if !defined(OS_MACOSX)
ScaleFactor GetScaleFactorForNativeView(gfx::NativeView view) {
- if (gfx::Screen::IsDIPEnabled()) {
- gfx::Display display = gfx::Screen::GetDisplayNearestWindow(view);
+ gfx::Screen* screen = gfx::Screen::GetScreenFor(view);
+ if (screen->IsDIPEnabled()) {
+ gfx::Display display = screen->GetDisplayNearestWindow(view);
return GetScaleFactorFromScale(display.device_scale_factor());
}
return ui::SCALE_FACTOR_100P;
« no previous file with comments | « ui/aura/window_unittest.cc ('k') | ui/gfx/screen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698