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

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

Issue 6821003: [Mac] First pass at multiple selection in the tabstrip. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase ToT Created 9 years, 8 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_view.mm
diff --git a/chrome/browser/ui/cocoa/tabs/tab_view.mm b/chrome/browser/ui/cocoa/tabs/tab_view.mm
index ecab140f34b0e43685eadfdce927c38fd000199a..5f9101be4b9aded7b4d4e6fb6baa5d06dbc764a7 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_view.mm
+++ b/chrome/browser/ui/cocoa/tabs/tab_view.mm
@@ -258,11 +258,6 @@ const CGFloat kRapidCloseDist = 2.5;
}
}
- // Fire the action to select the tab.
- if ([[controller_ target] respondsToSelector:[controller_ action]])
- [[controller_ target] performSelector:[controller_ action]
- withObject:self];
-
[self resetDragControllers];
// Resolve overlay back to original window.
@@ -546,7 +541,7 @@ const CGFloat kRapidCloseDist = 2.5;
// Compute where placeholder should go and insert it into the
// destination tab strip.
- TabView* draggedTabView = (TabView*)[draggedController_ selectedTabView];
+ TabView* draggedTabView = (TabView*)[draggedController_ activeTabView];
NSRect tabFrame = [draggedTabView frame];
tabFrame.origin = [dragWindow_ convertBaseToScreen:tabFrame.origin];
tabFrame.origin = [[targetController_ window]
@@ -573,6 +568,11 @@ const CGFloat kRapidCloseDist = 2.5;
// The drag/click is done. If the user dragged the mouse, finalize the drag
// and clean up.
+ // Fire the action to select the tab.
+ if ([[controller_ target] respondsToSelector:[controller_ action]])
+ [[controller_ target] performSelector:[controller_ action]
+ withObject:self];
+
// Special-case this to keep the logic below simpler.
if (moveWindowOnDrag_)
return;
@@ -596,13 +596,13 @@ const CGFloat kRapidCloseDist = 2.5;
// Move tab to new location.
DCHECK([sourceController_ numberOfTabs]);
TabWindowController* dropController = sourceController_;
- [dropController moveTabView:[dropController selectedTabView]
+ [dropController moveTabView:[dropController activeTabView]
fromController:nil];
}
} else if (targetController_) {
// Move between windows. If |targetController_| is nil, we're not dropping
// into any existing window.
- NSView* draggedTabView = [draggedController_ selectedTabView];
+ NSView* draggedTabView = [draggedController_ activeTabView];
[targetController_ moveTabView:draggedTabView
fromController:draggedController_];
// Force redraw to avoid flashes of old content before returning to event
@@ -775,7 +775,7 @@ const CGFloat kRapidCloseDist = 2.5;
// Mimic the tab strip's bottom border, which consists of a dark border
// and light highlight.
- if (!selected) {
+ if (![controller_ active]) {
[path addClip];
NSRect borderRect = rect;
borderRect.origin.y = lineWidth;
« no previous file with comments | « chrome/browser/ui/cocoa/tabs/tab_strip_model_observer_bridge.mm ('k') | chrome/browser/ui/cocoa/tabs/tab_window_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698