Chromium Code Reviews| 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); |