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

Unified Diff: ui/gfx/screen.h

Issue 1426933002: Refactor Windows DPI Point, Rect, and Size for Multiple Monitor DPI Awareness (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed Other Unit Tests - Moved Inner Classes Outside Created 4 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
Index: ui/gfx/screen.h
diff --git a/ui/gfx/screen.h b/ui/gfx/screen.h
index 107ee44e2431e1d4a42f2b4b5cad5ac9093ed462..cf6e558f89821740d3ae25ea00726da0f372d19c 100644
--- a/ui/gfx/screen.h
+++ b/ui/gfx/screen.h
@@ -91,6 +91,16 @@ class GFX_EXPORT Screen {
virtual void AddObserver(DisplayObserver* observer) = 0;
virtual void RemoveObserver(DisplayObserver* observer) = 0;
+ // Converts |screen_rect| to DIP coordinates in the context of view. If |view|
+ // is null, the primary display is used as the context.
+ virtual gfx::Rect ScreenToDIPRectInWindow(NativeView view,
+ const gfx::Rect& screen_rect) const;
+
+ // Converts |dip_rect| to screen coordinates in the context of view. If |view|
+ // is null, the primary display is used as the context.
+ virtual gfx::Rect DIPToScreenRectInWindow(NativeView view,
+ const gfx::Rect& dip_rect) const;
+
private:
DISALLOW_COPY_AND_ASSIGN(Screen);
};

Powered by Google App Engine
This is Rietveld 408576698