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

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

Issue 7565007: Clicking tab close with option key close the other tabs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed rsesek's comments. Created 9 years, 4 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 | « no previous file | chrome/browser/ui/cocoa/tabs/tab_controller_target.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4ee4a99d95d959d2b14a514f56fe26881c525dbd..d0a5c3de96b85b540addbea15a2e666d67f3743e 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_controller.mm
+++ b/chrome/browser/ui/cocoa/tabs/tab_controller.mm
@@ -144,6 +144,12 @@ class MenuDelegate : public ui::SimpleMenuModel::Delegate {
}
- (IBAction)closeTab:(id)sender {
+ if (([[NSApp currentEvent] modifierFlags] & NSAlternateKeyMask) &&
+ [[self target] respondsToSelector:@selector(closeOtherTabs:)]) {
+ [[self target] performSelector:@selector(closeOtherTabs:)
+ withObject:[self view]];
+ return;
+ }
if ([[self target] respondsToSelector:@selector(closeTab:)]) {
[[self target] performSelector:@selector(closeTab:)
withObject:[self view]];
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/tabs/tab_controller_target.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698