OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "app/l10n_util_mac.h" | 5 #include "app/l10n_util_mac.h" |
6 #include "base/mac_util.h" | 6 #include "base/mac_util.h" |
7 #import "chrome/browser/browser_theme_provider.h" | 7 #import "chrome/browser/browser_theme_provider.h" |
8 #import "chrome/browser/cocoa/menu_controller.h" | 8 #import "chrome/browser/cocoa/menu_controller.h" |
9 #import "chrome/browser/cocoa/tab_controller.h" | 9 #import "chrome/browser/cocoa/tab_controller.h" |
10 #import "chrome/browser/cocoa/tab_controller_target.h" | 10 #import "chrome/browser/cocoa/tab_controller_target.h" |
11 #import "chrome/browser/cocoa/tab_view.h" | 11 #import "chrome/browser/cocoa/tab_view.h" |
12 #import "chrome/browser/cocoa/themed_window.h" | 12 #import "chrome/browser/cocoa/themed_window.h" |
13 #include "grit/generated_resources.h" | 13 #include "grit/generated_resources.h" |
14 | 14 |
15 @implementation TabController | 15 @implementation TabController |
16 | 16 |
17 @synthesize loadingState = loadingState_; | 17 @synthesize loadingState = loadingState_; |
18 @synthesize mini = mini_; | 18 @synthesize mini = mini_; |
19 @synthesize pinned = pinned_; | 19 @synthesize pinned = pinned_; |
20 @synthesize phantom = phantom_; | |
21 @synthesize target = target_; | 20 @synthesize target = target_; |
22 @synthesize action = action_; | 21 @synthesize action = action_; |
23 | 22 |
24 namespace TabControllerInternal { | 23 namespace TabControllerInternal { |
25 | 24 |
26 // A C++ delegate that handles enabling/disabling menu items and handling when | 25 // A C++ delegate that handles enabling/disabling menu items and handling when |
27 // a menu command is chosen. Also fixes up the menu item label for "pin/unpin | 26 // a menu command is chosen. Also fixes up the menu item label for "pin/unpin |
28 // tab". | 27 // tab". |
29 class MenuDelegate : public menus::SimpleMenuModel::Delegate { | 28 class MenuDelegate : public menus::SimpleMenuModel::Delegate { |
30 public: | 29 public: |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 // Called by the tabs to determine whether we are in rapid (tab) closure mode. | 293 // Called by the tabs to determine whether we are in rapid (tab) closure mode. |
295 - (BOOL)inRapidClosureMode { | 294 - (BOOL)inRapidClosureMode { |
296 if ([[self target] respondsToSelector:@selector(inRapidClosureMode)]) { | 295 if ([[self target] respondsToSelector:@selector(inRapidClosureMode)]) { |
297 return [[self target] performSelector:@selector(inRapidClosureMode)] ? | 296 return [[self target] performSelector:@selector(inRapidClosureMode)] ? |
298 YES : NO; | 297 YES : NO; |
299 } | 298 } |
300 return NO; | 299 return NO; |
301 } | 300 } |
302 | 301 |
303 @end | 302 @end |
OLD | NEW |