OLD | NEW |
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 Loading... |
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 |
OLD | NEW |