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

Side by Side Diff: chrome/browser/ui/cocoa/tabs/tab_controller.mm

Issue 7709023: Revert 97828 - Clicking tab close with option key close the other tabs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/tabs/tab_controller_target.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/mac/mac_util.h" 5 #include "base/mac/mac_util.h"
6 #import "chrome/browser/themes/theme_service.h" 6 #import "chrome/browser/themes/theme_service.h"
7 #import "chrome/browser/ui/cocoa/menu_controller.h" 7 #import "chrome/browser/ui/cocoa/menu_controller.h"
8 #import "chrome/browser/ui/cocoa/tabs/tab_controller.h" 8 #import "chrome/browser/ui/cocoa/tabs/tab_controller.h"
9 #import "chrome/browser/ui/cocoa/tabs/tab_controller_target.h" 9 #import "chrome/browser/ui/cocoa/tabs/tab_controller_target.h"
10 #import "chrome/browser/ui/cocoa/tabs/tab_view.h" 10 #import "chrome/browser/ui/cocoa/tabs/tab_view.h"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 contextMenuModel_.reset( 137 contextMenuModel_.reset(
138 [target_ contextMenuModelForController:self 138 [target_ contextMenuModelForController:self
139 menuDelegate:contextMenuDelegate_.get()]); 139 menuDelegate:contextMenuDelegate_.get()]);
140 contextMenuController_.reset( 140 contextMenuController_.reset(
141 [[MenuController alloc] initWithModel:contextMenuModel_.get() 141 [[MenuController alloc] initWithModel:contextMenuModel_.get()
142 useWithPopUpButtonCell:NO]); 142 useWithPopUpButtonCell:NO]);
143 return [contextMenuController_ menu]; 143 return [contextMenuController_ menu];
144 } 144 }
145 145
146 - (IBAction)closeTab:(id)sender { 146 - (IBAction)closeTab:(id)sender {
147 if (([[NSApp currentEvent] modifierFlags] & NSAlternateKeyMask) &&
148 [[self target] respondsToSelector:@selector(closeOtherTabs:)]) {
149 [[self target] performSelector:@selector(closeOtherTabs:)
150 withObject:[self view]];
151 return;
152 }
153 if ([[self target] respondsToSelector:@selector(closeTab:)]) { 147 if ([[self target] respondsToSelector:@selector(closeTab:)]) {
154 [[self target] performSelector:@selector(closeTab:) 148 [[self target] performSelector:@selector(closeTab:)
155 withObject:[self view]]; 149 withObject:[self view]];
156 } 150 }
157 } 151 }
158 152
159 - (void)setTitle:(NSString*)title { 153 - (void)setTitle:(NSString*)title {
160 [[self view] setToolTip:title]; 154 [[self view] setToolTip:title];
161 if ([self mini] && ![self selected]) { 155 if ([self mini] && ![self selected]) {
162 TabView* tabView = static_cast<TabView*>([self view]); 156 TabView* tabView = static_cast<TabView*>([self view]);
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 331
338 - (void)continueDrag:(NSEvent*)event { 332 - (void)continueDrag:(NSEvent*)event {
339 [[target_ dragController] continueDrag:event]; 333 [[target_ dragController] continueDrag:event];
340 } 334 }
341 335
342 - (void)endDrag:(NSEvent*)event { 336 - (void)endDrag:(NSEvent*)event {
343 [[target_ dragController] endDrag:event]; 337 [[target_ dragController] endDrag:event];
344 } 338 }
345 339
346 @end 340 @end
OLDNEW
« 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