summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/tab_controller.mm
diff options
context:
space:
mode:
authorviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-01 13:40:24 +0000
committerviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-01 13:40:24 +0000
commitc8ff5088b569fa422e37d87db20b770e1e5476ef (patch)
tree780703a7a1511e6c47d404ad40f986ecb6847894 /chrome/browser/cocoa/tab_controller.mm
parent27a126d6b700e05534deb0e947f25f342ff3fa42 (diff)
downloadchromium_src-c8ff5088b569fa422e37d87db20b770e1e5476ef.zip
chromium_src-c8ff5088b569fa422e37d87db20b770e1e5476ef.tar.gz
chromium_src-c8ff5088b569fa422e37d87db20b770e1e5476ef.tar.bz2
(Mac) Make mashing the close tab button work.
To do this, I had to commit several crimes against humanity. In particular, Cocoa doesn't generate the required extra hit tests during animations, so we have to. Sometimes, it gets really messed up and ends up hitting the "drag blocking view". Moreover, we have to account for the possibility of the mouse down hitting a moving tab, and going up on the close button, etc. BUG=17720 TEST=Mash the close tabs button under a wide variety of situations. \ Also make sure that the handling of the tabs (dragging, etc.) \ hasn't accidentally been messed up. Review URL: http://codereview.chromium.org/174461 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25029 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/tab_controller.mm')
-rw-r--r--chrome/browser/cocoa/tab_controller.mm10
1 files changed, 10 insertions, 0 deletions
diff --git a/chrome/browser/cocoa/tab_controller.mm b/chrome/browser/cocoa/tab_controller.mm
index 96d7e5d..75f860d 100644
--- a/chrome/browser/cocoa/tab_controller.mm
+++ b/chrome/browser/cocoa/tab_controller.mm
@@ -182,4 +182,14 @@
[titleView_ setTextColor:color ? color : [NSColor textColor]];
[[self view] setNeedsDisplay:YES];
}
+
+// Called by the tabs to determine whether we are in rapid (tab) closure mode.
+- (BOOL)inRapidClosureMode {
+ if ([[self target] respondsToSelector:@selector(inRapidClosureMode)]) {
+ return [[self target] performSelector:@selector(inRapidClosureMode)] ?
+ YES : NO;
+ }
+ return NO;
+}
+
@end