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

Unified Diff: ui/base/layout_mac.mm

Issue 2739113002: Simplify calls for scale factor (Closed)
Patch Set: nit Created 3 years, 9 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/base/layout.cc ('k') | ui/snapshot/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/layout_mac.mm
diff --git a/ui/base/layout_mac.mm b/ui/base/layout_mac.mm
index 27e12e1fa095c49b78ea5e0355e7b30510e2dfd0..574a662a6889f90cafdcaf4154d22b1aefd68eb3 100644
--- a/ui/base/layout_mac.mm
+++ b/ui/base/layout_mac.mm
@@ -4,9 +4,10 @@
#include "ui/base/layout.h"
-#include <Cocoa/Cocoa.h>
+#import <Cocoa/Cocoa.h>
#include "base/mac/sdk_forward_declarations.h"
+#include "ui/display/display.h"
namespace {
@@ -28,6 +29,8 @@ float GetScaleFactorScaleForNativeView(gfx::NativeView view) {
namespace ui {
float GetScaleFactorForNativeView(gfx::NativeView view) {
+ if (display::Display::HasForceDeviceScaleFactor())
+ return display::Display::GetForcedDeviceScaleFactor();
return GetScaleFactorScaleForNativeView(view);
}
« no previous file with comments | « ui/base/layout.cc ('k') | ui/snapshot/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698