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

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

Issue 174461: (Mac) Make mashing the close tab button work. (Closed)
Patch Set: Rebased to ToT. Created 11 years, 3 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
« no previous file with comments | « chrome/browser/cocoa/tab_controller.h ('k') | chrome/browser/cocoa/tab_strip_controller.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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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_util.h" 5 #include "base/mac_util.h"
6 #include "chrome/browser/cocoa/nsimage_cache.h" 6 #include "chrome/browser/cocoa/nsimage_cache.h"
7 #import "chrome/browser/cocoa/tab_controller.h" 7 #import "chrome/browser/cocoa/tab_controller.h"
8 #import "chrome/browser/cocoa/tab_controller_target.h" 8 #import "chrome/browser/cocoa/tab_controller_target.h"
9 #import "chrome/browser/cocoa/tab_view.h" 9 #import "chrome/browser/cocoa/tab_view.h"
10 #import "third_party/GTM/AppKit/GTMTheme.h" 10 #import "third_party/GTM/AppKit/GTMTheme.h"
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 } 175 }
176 // Default to the selected text color unless told otherwise. 176 // Default to the selected text color unless told otherwise.
177 if (!color) { 177 if (!color) {
178 color = [theme textColorForStyle:GTMThemeStyleToolBar 178 color = [theme textColorForStyle:GTMThemeStyleToolBar
179 state:GTMThemeStateActiveWindow]; 179 state:GTMThemeStateActiveWindow];
180 } 180 }
181 181
182 [titleView_ setTextColor:color ? color : [NSColor textColor]]; 182 [titleView_ setTextColor:color ? color : [NSColor textColor]];
183 [[self view] setNeedsDisplay:YES]; 183 [[self view] setNeedsDisplay:YES];
184 } 184 }
185
186 // Called by the tabs to determine whether we are in rapid (tab) closure mode.
187 - (BOOL)inRapidClosureMode {
188 if ([[self target] respondsToSelector:@selector(inRapidClosureMode)]) {
189 return [[self target] performSelector:@selector(inRapidClosureMode)] ?
190 YES : NO;
191 }
192 return NO;
193 }
194
185 @end 195 @end
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/tab_controller.h ('k') | chrome/browser/cocoa/tab_strip_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698