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

Unified Diff: chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm

Issue 1775223002: Prepare chrome/ for compilation with OS X 10.7 deployment target. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Compile errors. Fix null-window error. 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
Index: chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
diff --git a/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm b/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
index c5a6261d9eec208faa61f5ecc082fa8f0e1d4152..69eabbc240d965ad95fdbfec4bd41a0332bea1c2 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
+++ b/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
@@ -62,6 +62,7 @@
#include "skia/ext/skia_utils_mac.h"
#import "third_party/google_toolbox_for_mac/src/AppKit/GTMNSAnimation+Duration.h"
#include "ui/base/cocoa/animation_utils.h"
+#include "ui/base/cocoa/cocoa_base_utils.h"
#import "ui/base/cocoa/tracking_area.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/material_design/material_design_controller.h"
@@ -270,7 +271,8 @@ private:
- (void)trackClickForWindowMove:(NSEvent*)event {
NSWindow* window = [self window];
NSPoint frameOrigin = [window frame].origin;
- NSPoint lastEventLoc = [window convertBaseToScreen:[event locationInWindow]];
+ NSPoint lastEventLoc =
+ ui::ConvertPointFromWindowToScreen(window, [event locationInWindow]);
while ((event = [NSApp nextEventMatchingMask:
NSLeftMouseDownMask|NSLeftMouseDraggedMask|NSLeftMouseUpMask
untilDate:[NSDate distantFuture]
@@ -279,7 +281,8 @@ private:
[event type] != NSLeftMouseUp) {
base::mac::ScopedNSAutoreleasePool pool;
- NSPoint now = [window convertBaseToScreen:[event locationInWindow]];
+ NSPoint now =
+ ui::ConvertPointFromWindowToScreen(window, [event locationInWindow]);
frameOrigin.x += now.x - lastEventLoc.x;
frameOrigin.y += now.y - lastEventLoc.y;
[window setFrameOrigin:frameOrigin];
« no previous file with comments | « chrome/browser/ui/cocoa/status_bubble_mac.mm ('k') | chrome/browser/ui/cocoa/tabs/tab_strip_drag_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698