| Index: ui/base/cocoa/cocoa_base_utils.mm
|
| diff --git a/ui/base/cocoa/cocoa_base_utils.mm b/ui/base/cocoa/cocoa_base_utils.mm
|
| index 0830f3488a8bddb2f8708155cb562838fda0c21a..ca5d885abf84fa4c5accf04401ef22e0c1f0be41 100644
|
| --- a/ui/base/cocoa/cocoa_base_utils.mm
|
| +++ b/ui/base/cocoa/cocoa_base_utils.mm
|
| @@ -4,6 +4,7 @@
|
|
|
| #include "ui/base/cocoa/cocoa_base_utils.h"
|
|
|
| +#include "base/mac/sdk_forward_declarations.h"
|
| #include "ui/events/cocoa/cocoa_event_utils.h"
|
|
|
| namespace ui {
|
| @@ -19,4 +20,14 @@ WindowOpenDisposition WindowOpenDispositionFromNSEventWithFlags(
|
| return DispositionFromEventFlags(event_flags);
|
| }
|
|
|
| +NSPoint ConvertPointFromWindowToScreen(NSWindow* window, NSPoint point) {
|
| + NSRect point_rect = NSMakeRect(point.x, point.y, 0, 0);
|
| + return [window convertRectToScreen:point_rect].origin;
|
| +}
|
| +
|
| +NSPoint ConvertPointFromScreenToWindow(NSWindow* window, NSPoint point) {
|
| + NSRect point_rect = NSMakeRect(point.x, point.y, 0, 0);
|
| + return [window convertRectFromScreen:point_rect].origin;
|
| +}
|
| +
|
| } // namespace ui
|
|
|