OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ui/gfx/win/dpi.h" | 5 #include "ui/gfx/win/dpi.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 #include "base/command_line.h" | |
9 #include "base/win/scoped_hdc.h" | 8 #include "base/win/scoped_hdc.h" |
10 #include "base/win/windows_version.h" | 9 #include "base/win/windows_version.h" |
11 #include "base/win/registry.h" | 10 #include "base/win/registry.h" |
12 #include "ui/gfx/display.h" | 11 #include "ui/gfx/display.h" |
13 #include "ui/gfx/switches.h" | |
14 #include "ui/gfx/point_conversions.h" | 12 #include "ui/gfx/point_conversions.h" |
15 #include "ui/gfx/rect_conversions.h" | 13 #include "ui/gfx/rect_conversions.h" |
16 #include "ui/gfx/size_conversions.h" | 14 #include "ui/gfx/size_conversions.h" |
17 | 15 |
18 namespace { | 16 namespace { |
19 | 17 |
20 int kDefaultDPIX = 96; | 18 int kDefaultDPIX = 96; |
21 int kDefaultDPIY = 96; | 19 int kDefaultDPIY = 96; |
22 | 20 |
23 bool force_highdpi_for_testing = false; | 21 bool force_highdpi_for_testing = false; |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 return static_cast<int>(GetSystemMetrics(metric) / | 221 return static_cast<int>(GetSystemMetrics(metric) / |
224 GetDeviceScaleFactor() + 0.5); | 222 GetDeviceScaleFactor() + 0.5); |
225 } | 223 } |
226 | 224 |
227 bool IsDeviceScaleFactorSet() { | 225 bool IsDeviceScaleFactorSet() { |
228 return g_device_scale_factor != 0.0f; | 226 return g_device_scale_factor != 0.0f; |
229 } | 227 } |
230 | 228 |
231 } // namespace win | 229 } // namespace win |
232 } // namespace gfx | 230 } // namespace gfx |
OLD | NEW |