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

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

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.mm
diff --git a/ui/gfx/mac/coordinate_conversion.mm b/ui/gfx/mac/coordinate_conversion.mm
index b31ce9e1451b2d33a6f70f287d5fdf7d876eaff5..9932842cff4fc87b8995f01420bcdb0e0e0dd75d 100644
--- a/ui/gfx/mac/coordinate_conversion.mm
+++ b/ui/gfx/mac/coordinate_conversion.mm
@@ -8,6 +8,7 @@
#include "ui/gfx/geometry/point.h"
#include "ui/gfx/geometry/rect.h"
+#include "ui/gfx/geometry/size.h"
namespace gfx {
@@ -34,6 +35,14 @@ Rect ScreenRectFromNSRect(const NSRect& rect) {
rect.size.width, rect.size.height);
}
+NSSize ScreenSizeToNSSize(const Size& size) {
+ return NSMakeSize(size.width(), size.height());
+}
+
+Size ScreenSizeFromNSSize(const NSSize& size) {
+ return Size(size.width, size.height);
+}
+
NSPoint ScreenPointToNSPoint(const Point& point) {
return NSMakePoint(point.x(), PrimaryDisplayHeight() - point.y());
}

Powered by Google App Engine
This is Rietveld 408576698