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" |
(...skipping 28 matching lines...) Expand all Loading... |
39 @private | 39 @private |
40 IBOutlet NSView* iconView_; | 40 IBOutlet NSView* iconView_; |
41 IBOutlet NSTextField* titleView_; | 41 IBOutlet NSTextField* titleView_; |
42 IBOutlet HoverCloseButton* closeButton_; | 42 IBOutlet HoverCloseButton* closeButton_; |
43 | 43 |
44 NSRect originalIconFrame_; // frame of iconView_ as loaded from nib | 44 NSRect originalIconFrame_; // frame of iconView_ as loaded from nib |
45 BOOL isIconShowing_; // last state of iconView_ in updateVisibility | 45 BOOL isIconShowing_; // last state of iconView_ in updateVisibility |
46 BOOL selected_; | 46 BOOL selected_; |
47 BOOL mini_; | 47 BOOL mini_; |
48 BOOL pinned_; | 48 BOOL pinned_; |
49 BOOL phantom_; | |
50 TabLoadingState loadingState_; | 49 TabLoadingState loadingState_; |
51 CGFloat iconTitleXOffset_; // between left edges of icon and title | 50 CGFloat iconTitleXOffset_; // between left edges of icon and title |
52 CGFloat titleCloseWidthOffset_; // between right edges of icon and close btn. | 51 CGFloat titleCloseWidthOffset_; // between right edges of icon and close btn. |
53 id<TabControllerTarget> target_; // weak, where actions are sent | 52 id<TabControllerTarget> target_; // weak, where actions are sent |
54 SEL action_; // selector sent when tab is selected by clicking | 53 SEL action_; // selector sent when tab is selected by clicking |
55 scoped_ptr<TabMenuModel> contextMenuModel_; | 54 scoped_ptr<TabMenuModel> contextMenuModel_; |
56 scoped_ptr<TabControllerInternal::MenuDelegate> contextMenuDelegate_; | 55 scoped_ptr<TabControllerInternal::MenuDelegate> contextMenuDelegate_; |
57 scoped_nsobject<MenuController> contextMenuController_; | 56 scoped_nsobject<MenuController> contextMenuController_; |
58 } | 57 } |
59 | 58 |
60 @property(assign, nonatomic) TabLoadingState loadingState; | 59 @property(assign, nonatomic) TabLoadingState loadingState; |
61 | 60 |
62 @property(assign, nonatomic) BOOL selected; | 61 @property(assign, nonatomic) BOOL selected; |
63 @property(assign, nonatomic) BOOL mini; | 62 @property(assign, nonatomic) BOOL mini; |
64 @property(assign, nonatomic) BOOL pinned; | 63 @property(assign, nonatomic) BOOL pinned; |
65 @property(assign, nonatomic) BOOL phantom; | |
66 @property(assign, nonatomic) id target; | 64 @property(assign, nonatomic) id target; |
67 @property(assign, nonatomic) SEL action; | 65 @property(assign, nonatomic) SEL action; |
68 | 66 |
69 // Minimum and maximum allowable tab width. The minimum width does not show | 67 // Minimum and maximum allowable tab width. The minimum width does not show |
70 // the icon or the close button. The selected tab always has at least a close | 68 // the icon or the close button. The selected tab always has at least a close |
71 // button so it has a different minimum width. | 69 // button so it has a different minimum width. |
72 + (CGFloat)minTabWidth; | 70 + (CGFloat)minTabWidth; |
73 + (CGFloat)maxTabWidth; | 71 + (CGFloat)maxTabWidth; |
74 + (CGFloat)minSelectedTabWidth; | 72 + (CGFloat)minSelectedTabWidth; |
75 + (CGFloat)miniTabWidth; | 73 + (CGFloat)miniTabWidth; |
(...skipping 25 matching lines...) Expand all Loading... |
101 @end | 99 @end |
102 | 100 |
103 @interface TabController(TestingAPI) | 101 @interface TabController(TestingAPI) |
104 - (NSString*)toolTip; | 102 - (NSString*)toolTip; |
105 - (int)iconCapacity; | 103 - (int)iconCapacity; |
106 - (BOOL)shouldShowIcon; | 104 - (BOOL)shouldShowIcon; |
107 - (BOOL)shouldShowCloseButton; | 105 - (BOOL)shouldShowCloseButton; |
108 @end // TabController(TestingAPI) | 106 @end // TabController(TestingAPI) |
109 | 107 |
110 #endif // CHROME_BROWSER_COCOA_TAB_CONTROLLER_H_ | 108 #endif // CHROME_BROWSER_COCOA_TAB_CONTROLLER_H_ |
OLD | NEW |