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

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

Issue 2016243002: Mac a11y: Add RoleDescription and Value attributes to accessibility information. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: TODO for comparing against Cocoa. Created 4 years, 7 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.h
diff --git a/ui/gfx/mac/coordinate_conversion.h b/ui/gfx/mac/coordinate_conversion.h
index 3b75485357b72d3ad6aff7a1e220000bebd30201..6ced20b261aa56347ef73eb03dfb6fe6ea59700e 100644
--- a/ui/gfx/mac/coordinate_conversion.h
+++ b/ui/gfx/mac/coordinate_conversion.h
@@ -13,15 +13,22 @@ namespace gfx {
class Point;
class Rect;
+class Size;
// 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 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 Rect ScreenRectFromNSRect(const NSRect& point);
+// Convert a gfx::Size specified in pixels display into AppKit screen sizes.
+GFX_EXPORT NSSize ScreenSizeToNSSize(const Size& size);
tapted 2016/06/06 04:09:51 Something like `NSSize ns_size = size.ToCGSize()`
Patti Lor 2016/06/10 01:36:10 Done.
+
+// Convert an AppKit NSSize into a gfx::Size.
+GFX_EXPORT Size ScreenSizeFromNSSize(const NSSize& size);
+
// 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 Point& point);

Powered by Google App Engine
This is Rietveld 408576698