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

Unified Diff: ui/base/cocoa/cocoa_base_utils.mm

Issue 1777653002: Prepare ui/ module for compilation with OS X 10.7 deployment target. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More compile errors. Created 4 years, 9 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
« no previous file with comments | « ui/base/cocoa/cocoa_base_utils.h ('k') | ui/base/cocoa/command_dispatcher.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « ui/base/cocoa/cocoa_base_utils.h ('k') | ui/base/cocoa/command_dispatcher.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698