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

Unified Diff: ui/views/test/event_generator_delegate_mac.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/views/controls/menu/menu_runner_impl_cocoa.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/test/event_generator_delegate_mac.mm
diff --git a/ui/views/test/event_generator_delegate_mac.mm b/ui/views/test/event_generator_delegate_mac.mm
index 44e65c56893d9fd669e94788d8a4dfb67758c7d1..6c371e418d9854a667521c18b7ae4a859e744a73 100644
--- a/ui/views/test/event_generator_delegate_mac.mm
+++ b/ui/views/test/event_generator_delegate_mac.mm
@@ -9,6 +9,7 @@
#import "base/mac/scoped_objc_class_swizzler.h"
#include "base/macros.h"
#include "base/memory/singleton.h"
+#include "ui/base/cocoa/cocoa_base_utils.h"
#include "ui/events/event_processor.h"
#include "ui/events/event_target.h"
#include "ui/events/event_target_iterator.h"
@@ -35,8 +36,8 @@ namespace {
NSPoint ConvertRootPointToTarget(NSWindow* target,
const gfx::Point& point_in_root) {
- // Normally this would do [NSWindow convertScreenToBase:]. However, Cocoa can
- // reposition the window on screen and make things flaky. Initially, just
+ // Normally this would do ui::ConvertPointFromScreenToWindow. However, Cocoa
+ // can reposition the window on screen and make things flaky. Initially, just
// assume that the contentRect of |target| is at the top-left corner of the
// screen.
NSRect content_rect = [target contentRectForFrameRect:[target frame]];
@@ -473,7 +474,7 @@ void InitializeMacEventGeneratorDelegate() {
gfx::Point point_in_root = generator->current_location();
NSWindow* window = EventGeneratorDelegateMac::GetInstance()->window();
NSPoint point_in_window = ConvertRootPointToTarget(window, point_in_root);
- return [window convertBaseToScreen:point_in_window];
+ return ui::ConvertPointFromWindowToScreen(window, point_in_window);
}
@end
« no previous file with comments | « ui/views/controls/menu/menu_runner_impl_cocoa.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698