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

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

Issue 7080064: [Mac] Refactor the logic of tab dragging out of TabView and into a new helper. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 7 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_controller.mm
diff --git a/chrome/browser/ui/cocoa/tabs/tab_controller.mm b/chrome/browser/ui/cocoa/tabs/tab_controller.mm
index 2ff7ea9ea18d96219e13cdf077998ca7c3bddedb..4ee4a99d95d959d2b14a514f56fe26881c525dbd 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_controller.mm
+++ b/chrome/browser/ui/cocoa/tabs/tab_controller.mm
@@ -319,4 +319,22 @@ class MenuDelegate : public ui::SimpleMenuModel::Delegate {
return NO;
}
+// The following methods are invoked from the TabView and are forwarded to the
+// TabStripDragController.
+- (BOOL)tabCanBeDragged:(TabController*)controller {
+ return [[target_ dragController] tabCanBeDragged:controller];
+}
+
+- (void)maybeStartDrag:(NSEvent*)event forTab:(TabController*)tab {
+ [[target_ dragController] maybeStartDrag:event forTab:tab];
+}
+
+- (void)continueDrag:(NSEvent*)event {
+ [[target_ dragController] continueDrag:event];
+}
+
+- (void)endDrag:(NSEvent*)event {
+ [[target_ dragController] endDrag:event];
+}
+
@end

Powered by Google App Engine
This is Rietveld 408576698