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

Unified Diff: ui/base/layout.cc

Issue 293563002: GetScaleFactorForNativeView should return scale factor in float (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/base/layout.h ('k') | ui/base/layout_mac.mm » ('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 783ab5a989bca63aadb045e7334d634b5185e6a7..6ce0ccc2f46c1a38bd12bfd52902ae4bcea92528 100644
--- a/ui/base/layout.cc
+++ b/ui/base/layout.cc
@@ -144,13 +144,13 @@ ScopedSetSupportedScaleFactors::~ScopedSetSupportedScaleFactors() {
} // namespace test
#if !defined(OS_MACOSX)
-ScaleFactor GetScaleFactorForNativeView(gfx::NativeView view) {
+float GetScaleFactorForNativeView(gfx::NativeView view) {
gfx::Screen* screen = gfx::Screen::GetScreenFor(view);
if (screen->IsDIPEnabled()) {
gfx::Display display = screen->GetDisplayNearestWindow(view);
- return GetSupportedScaleFactor(display.device_scale_factor());
+ return display.device_scale_factor();
}
- return ui::SCALE_FACTOR_100P;
+ return 1.0f;
}
#endif // !defined(OS_MACOSX)
« no previous file with comments | « ui/base/layout.h ('k') | ui/base/layout_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698