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

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

Issue 789763002: MacViews: Implement capture using NSEvent local+global monitors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@20140812-MacViews-LAYERS2-PRESQUASH
Patch Set: NULL -> nullptr Created 6 years 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/events/cocoa/events_mac.mm ('k') | ui/gfx/mac/coordinate_conversion.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/mac/coordinate_conversion.h
diff --git a/ui/gfx/mac/coordinate_conversion.h b/ui/gfx/mac/coordinate_conversion.h
index 3deec9a94767d9aee4544bb6386048584eab827b..4f185eb93368fe4e4e6673044d2b5a738c56c99a 100644
--- a/ui/gfx/mac/coordinate_conversion.h
+++ b/ui/gfx/mac/coordinate_conversion.h
@@ -11,15 +11,24 @@
namespace gfx {
+class Point;
class Rect;
// Convert a gfx::Rect specified with the origin at the top left of the primary
-// display into AppKit secreen coordinates (origin at the bottom left).
+// display into AppKit screen coordinates (origin at the bottom left).
GFX_EXPORT NSRect ScreenRectToNSRect(const gfx::Rect& rect);
// Convert an AppKit NSRect with origin in the bottom left of the primary
// display into a gfx::Rect with origin at the top left of the primary display.
-GFX_EXPORT gfx::Rect ScreenRectFromNSRect(const NSRect& point);
+GFX_EXPORT gfx::Rect ScreenRectFromNSRect(const NSRect& rect);
+
+// Convert a gfx::Point specified with the origin at the top left of the primary
+// display into AppKit screen coordinates (origin at the bottom left).
+GFX_EXPORT NSPoint ScreenPointToNSPoint(const gfx::Point& point);
+
+// Convert an AppKit NSPoint with origin in the bottom left of the primary
+// display into a gfx::Point with origin at the top left of the primary display.
+GFX_EXPORT gfx::Point ScreenPointFromNSPoint(const NSPoint& point);
} // namespace gfx
« no previous file with comments | « ui/events/cocoa/events_mac.mm ('k') | ui/gfx/mac/coordinate_conversion.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698