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

Unified Diff: ui/base/win/dpi.h

Issue 11953054: Fix high-DPI on Windows to make use of DIP scaling in WebKit. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Remove redundant comments. Created 7 years, 11 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/base/win/dpi.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/win/dpi.h
diff --git a/ui/base/win/dpi.h b/ui/base/win/dpi.h
index 930922a0c4ad21d4c0d6c474a2bca49b0fb888aa..99252c71d7f0e4af4c7d5a791e7df4fdce980bc6 100644
--- a/ui/base/win/dpi.h
+++ b/ui/base/win/dpi.h
@@ -5,6 +5,8 @@
#ifndef UI_BASE_WIN_DPI_H_
#define UI_BASE_WIN_DPI_H_
+#include "ui/gfx/point.h"
+#include "ui/gfx/rect.h"
#include "ui/gfx/size.h"
#include "ui/base/ui_export.h"
@@ -20,6 +22,24 @@ UI_EXPORT bool IsInHighDPIMode();
UI_EXPORT void EnableHighDPISupport();
+// TODO(kevers|girard): Move above methods into win namespace.
+
+namespace win {
+
+UI_EXPORT float GetDeviceScaleFactor();
+
+UI_EXPORT gfx::Point ScreenToDIPPoint(const gfx::Point& pixel_point);
+
+UI_EXPORT gfx::Rect ScreenToDIPRect(const gfx::Rect& pixel_bounds);
+
+UI_EXPORT gfx::Rect DIPToScreenRect(const gfx::Rect& dip_bounds);
+
+UI_EXPORT gfx::Size ScreenToDIPSize(const gfx::Size& size_in_pixels);
+
+UI_EXPORT gfx::Size DIPToScreenSize(const gfx::Size& dip_size);
+
+} // namespace win
+
} // namespace ui
#endif // UI_BASE_WIN_DPI_H_
« no previous file with comments | « ui/base/layout.cc ('k') | ui/base/win/dpi.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698