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 #ifndef CHROME_BROWSER_COCOA_TAB_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_COCOA_TAB_CONTROLLER_H_ |
6 #define CHROME_BROWSER_COCOA_TAB_CONTROLLER_H_ | 6 #define CHROME_BROWSER_COCOA_TAB_CONTROLLER_H_ |
7 | 7 |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 #import "chrome/browser/cocoa/hover_close_button.h" | 9 #import "chrome/browser/cocoa/hover_close_button.h" |
10 #include "chrome/browser/tab_menu_model.h" | 10 #include "chrome/browser/tab_menu_model.h" |
| 11 #include "chrome/browser/view_ids.h" |
11 | 12 |
12 // The loading/waiting state of the tab. | 13 // The loading/waiting state of the tab. |
13 enum TabLoadingState { | 14 enum TabLoadingState { |
14 kTabDone, | 15 kTabDone, |
15 kTabLoading, | 16 kTabLoading, |
16 kTabWaiting, | 17 kTabWaiting, |
17 kTabCrashed, | 18 kTabCrashed, |
18 }; | 19 }; |
19 | 20 |
20 @class MenuController; | 21 @class MenuController; |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 // Ideally, tabs would know about their own animation and wouldn't need this. | 96 // Ideally, tabs would know about their own animation and wouldn't need this. |
96 - (BOOL)inRapidClosureMode; | 97 - (BOOL)inRapidClosureMode; |
97 | 98 |
98 // Updates the visibility of certain subviews, such as the icon and close | 99 // Updates the visibility of certain subviews, such as the icon and close |
99 // button, based on criteria such as the tab's selected state and its current | 100 // button, based on criteria such as the tab's selected state and its current |
100 // width. | 101 // width. |
101 - (void)updateVisibility; | 102 - (void)updateVisibility; |
102 | 103 |
103 // Update the title color to match the tabs current state. | 104 // Update the title color to match the tabs current state. |
104 - (void)updateTitleColor; | 105 - (void)updateTitleColor; |
| 106 |
| 107 // Returns the ViewID of the tab. |
| 108 - (ViewID)viewID; |
| 109 |
105 @end | 110 @end |
106 | 111 |
107 @interface TabController(TestingAPI) | 112 @interface TabController(TestingAPI) |
108 - (NSString*)toolTip; | 113 - (NSString*)toolTip; |
109 - (int)iconCapacity; | 114 - (int)iconCapacity; |
110 - (BOOL)shouldShowIcon; | 115 - (BOOL)shouldShowIcon; |
111 - (BOOL)shouldShowCloseButton; | 116 - (BOOL)shouldShowCloseButton; |
112 @end // TabController(TestingAPI) | 117 @end // TabController(TestingAPI) |
113 | 118 |
114 #endif // CHROME_BROWSER_COCOA_TAB_CONTROLLER_H_ | 119 #endif // CHROME_BROWSER_COCOA_TAB_CONTROLLER_H_ |
OLD | NEW |