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

Side by Side Diff: ui/gfx/win/dpi.h

Issue 153403003: Move supports-high-dpi flag into registry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup. Renaming function. Created 6 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 unified diff | Download patch
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_browsertest.cc ('k') | ui/gfx/win/dpi.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef UI_GFX_DPI_WIN_H_ 5 #ifndef UI_GFX_DPI_WIN_H_
6 #define UI_GFX_DPI_WIN_H_ 6 #define UI_GFX_DPI_WIN_H_
7 7
8 #include "ui/gfx/gfx_export.h" 8 #include "ui/gfx/gfx_export.h"
9 #include "ui/gfx/point.h" 9 #include "ui/gfx/point.h"
10 #include "ui/gfx/rect.h" 10 #include "ui/gfx/rect.h"
(...skipping 19 matching lines...) Expand all
30 // unscaled or "not running on win8+" 30 // unscaled or "not running on win8+"
31 GFX_EXPORT float GetModernUIScale(); 31 GFX_EXPORT float GetModernUIScale();
32 32
33 // Tests to see if the command line flag "--high-dpi-support" is set. 33 // Tests to see if the command line flag "--high-dpi-support" is set.
34 GFX_EXPORT bool IsHighDPIEnabled(); 34 GFX_EXPORT bool IsHighDPIEnabled();
35 35
36 GFX_EXPORT bool IsInHighDPIMode(); 36 GFX_EXPORT bool IsInHighDPIMode();
37 37
38 GFX_EXPORT void EnableHighDPISupport(); 38 GFX_EXPORT void EnableHighDPISupport();
39 39
40 GFX_EXPORT void ForceHighDPISupportForTesting(float scale);
41
40 // TODO(kevers|girard): Move above methods into win namespace. 42 // TODO(kevers|girard): Move above methods into win namespace.
41 43
42 namespace win { 44 namespace win {
43 45
44 GFX_EXPORT float GetDeviceScaleFactor(); 46 GFX_EXPORT float GetDeviceScaleFactor();
45 47
46 GFX_EXPORT Point ScreenToDIPPoint(const Point& pixel_point); 48 GFX_EXPORT Point ScreenToDIPPoint(const Point& pixel_point);
47 49
48 GFX_EXPORT Point DIPToScreenPoint(const Point& dip_point); 50 GFX_EXPORT Point DIPToScreenPoint(const Point& dip_point);
49 51
(...skipping 19 matching lines...) Expand all
69 71
70 // Win7 and Win8 send touch events scaled according to the current DPI 72 // Win7 and Win8 send touch events scaled according to the current DPI
71 // scaling. Win8.1 corrects this, and sends touch events in DPI units. 73 // scaling. Win8.1 corrects this, and sends touch events in DPI units.
72 // This function returns the appropriate scaling factor for touch events. 74 // This function returns the appropriate scaling factor for touch events.
73 GFX_EXPORT double GetUndocumentedDPITouchScale(); 75 GFX_EXPORT double GetUndocumentedDPITouchScale();
74 76
75 } // namespace win 77 } // namespace win
76 } // namespace gfx 78 } // namespace gfx
77 79
78 #endif // UI_GFX_DPI_WIN_H_ 80 #endif // UI_GFX_DPI_WIN_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_browsertest.cc ('k') | ui/gfx/win/dpi.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698