OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_UI_COCOA_TABS_TAB_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_TABS_TAB_CONTROLLER_H_ |
6 #define CHROME_BROWSER_UI_COCOA_TABS_TAB_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_COCOA_TABS_TAB_CONTROLLER_H_ |
7 | 7 |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
69 @property(assign, nonatomic) SEL action; | 69 @property(assign, nonatomic) SEL action; |
70 @property(assign, nonatomic) BOOL pinned; | 70 @property(assign, nonatomic) BOOL pinned; |
71 @property(assign, nonatomic) NSString* toolTip; | 71 @property(assign, nonatomic) NSString* toolTip; |
72 // Note that |-selected| will return YES if the controller is |-active|, too. | 72 // Note that |-selected| will return YES if the controller is |-active|, too. |
73 // |-setSelected:| affects the selection, while |-setActive:| affects the key | 73 // |-setSelected:| affects the selection, while |-setActive:| affects the key |
74 // status/focus of the content. | 74 // status/focus of the content. |
75 @property(assign, nonatomic) BOOL active; | 75 @property(assign, nonatomic) BOOL active; |
76 @property(assign, nonatomic) BOOL selected; | 76 @property(assign, nonatomic) BOOL selected; |
77 @property(assign, nonatomic) id target; | 77 @property(assign, nonatomic) id target; |
78 @property(assign, nonatomic) GURL url; | 78 @property(assign, nonatomic) GURL url; |
79 @property(assign, nonatomic) BOOL shouldUseDefaultFavicon; | |
79 @property(readonly, nonatomic) NSView* iconView; | 80 @property(readonly, nonatomic) NSView* iconView; |
80 @property(readonly, nonatomic) AlertIndicatorButton* alertIndicatorButton; | 81 @property(readonly, nonatomic) AlertIndicatorButton* alertIndicatorButton; |
81 @property(readonly, nonatomic) HoverCloseButton* closeButton; | 82 @property(readonly, nonatomic) HoverCloseButton* closeButton; |
82 | 83 |
83 // Default height for tabs. | 84 // Default height for tabs. |
84 + (CGFloat)defaultTabHeight; | 85 + (CGFloat)defaultTabHeight; |
85 | 86 |
86 // Minimum and maximum allowable tab width. The minimum width does not show | 87 // Minimum and maximum allowable tab width. The minimum width does not show |
87 // the icon or the close button. The active tab always has at least a close | 88 // the icon or the close button. The active tab always has at least a close |
88 // button so it has a different minimum width. | 89 // button so it has a different minimum width. |
(...skipping 28 matching lines...) Expand all Loading... | |
117 // Ideally, tabs would know about their own animation and wouldn't need this. | 118 // Ideally, tabs would know about their own animation and wouldn't need this. |
118 - (BOOL)inRapidClosureMode; | 119 - (BOOL)inRapidClosureMode; |
119 | 120 |
120 // Updates the visibility of certain subviews, such as the icon and close | 121 // Updates the visibility of certain subviews, such as the icon and close |
121 // button, based on criteria such as the tab's selected state and its current | 122 // button, based on criteria such as the tab's selected state and its current |
122 // width. | 123 // width. |
123 - (void)updateVisibility; | 124 - (void)updateVisibility; |
124 | 125 |
125 // Update the title color to match the tabs current state. | 126 // Update the title color to match the tabs current state. |
126 - (void)updateTitleColor; | 127 - (void)updateTitleColor; |
128 | |
129 // Update the favicon's color if we're using the default favicon and is using | |
130 // Material Design. | |
131 - (void)updateDefaultFavicon; | |
Robert Sesek
2016/07/12 23:43:56
Does this need to be public?
spqchan
2016/07/13 17:16:14
Done.
| |
132 | |
127 @end | 133 @end |
128 | 134 |
129 @interface TabController(TestingAPI) | 135 @interface TabController(TestingAPI) |
130 - (int)iconCapacity; | 136 - (int)iconCapacity; |
131 - (BOOL)shouldShowIcon; | 137 - (BOOL)shouldShowIcon; |
132 - (BOOL)shouldShowAlertIndicator; | 138 - (BOOL)shouldShowAlertIndicator; |
133 - (BOOL)shouldShowCloseButton; | 139 - (BOOL)shouldShowCloseButton; |
134 @end // TabController(TestingAPI) | 140 @end // TabController(TestingAPI) |
135 | 141 |
136 #endif // CHROME_BROWSER_UI_COCOA_TABS_TAB_CONTROLLER_H_ | 142 #endif // CHROME_BROWSER_UI_COCOA_TABS_TAB_CONTROLLER_H_ |
OLD | NEW |