Index: ui/base/layout.cc |
diff --git a/ui/base/layout.cc b/ui/base/layout.cc |
index a0381592961ce47ed5ac6798b410b68833a8b27c..7e1f403f0ee2c4b4e90a0fc31e9471c6fd3e9be2 100644 |
--- a/ui/base/layout.cc |
+++ b/ui/base/layout.cc |
@@ -14,6 +14,7 @@ |
#include "build/build_config.h" |
#include "ui/base/touch/touch_device.h" |
#include "ui/base/ui_base_switches.h" |
+#include "ui/base/win/dpi.h" |
#include "ui/gfx/display.h" |
#include "ui/gfx/screen.h" |
@@ -119,10 +120,14 @@ std::vector<ScaleFactor>& GetSupportedScaleFactorsInternal() { |
if (base::mac::IsOSLionOrLater()) |
supported_scale_factors->push_back(SCALE_FACTOR_200P); |
#elif defined(OS_WIN) && defined(ENABLE_HIDPI) |
- if (base::win::IsMetroProcess() && ui::IsTouchDevicePresent()) { |
- supported_scale_factors->push_back(SCALE_FACTOR_140P); |
+ float scale = ui::GetDPIScale(); |
+ if (scale > 1.6) |
supported_scale_factors->push_back(SCALE_FACTOR_180P); |
- } |
+ else if (scale > 1.2) |
+ supported_scale_factors->push_back(SCALE_FACTOR_140P); |
+ else |
+#elif defined(OS_WIN) |
+ supported_scale_factors->push_back(SCALE_FACTOR_100P); |
#elif defined(OS_CHROMEOS) |
// TODO(oshima): Include 200P only if the device support 200P |
supported_scale_factors->push_back(SCALE_FACTOR_200P); |