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

Unified Diff: ui/gfx/mac/coordinate_conversion.mm

Issue 1280673003: [Mac] Enable MacViews site settings bubble behind --enable-mac-views-dialogs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@enabledialogs
Patch Set: Sync Created 5 years, 4 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/mac/coordinate_conversion.mm
diff --git a/ui/gfx/mac/coordinate_conversion.mm b/ui/gfx/mac/coordinate_conversion.mm
index b2c41a455d6c96c4aa18e2928937c1c93f3cdb45..c2fdb94e950926dd58f32230fca3cf711f26377c 100644
--- a/ui/gfx/mac/coordinate_conversion.mm
+++ b/ui/gfx/mac/coordinate_conversion.mm
@@ -34,4 +34,12 @@ gfx::Rect ScreenRectFromNSRect(const NSRect& rect) {
rect.size.height);
}
+NSPoint ScreenPointToNSPoint(const gfx::Point& point) {
+ return NSMakePoint(point.x(), PrimaryDisplayHeight() - point.y());
+}
+
+gfx::Point ScreenPointFromNSPoint(const NSPoint& point) {
+ return gfx::Point(point.x, PrimaryDisplayHeight() - point.y);
+}
+
} // namespace gfx

Powered by Google App Engine
This is Rietveld 408576698