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_STRIP_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_COCOA_TAB_STRIP_CONTROLLER_H_ |
6 #define CHROME_BROWSER_COCOA_TAB_STRIP_CONTROLLER_H_ | 6 #define CHROME_BROWSER_COCOA_TAB_STRIP_CONTROLLER_H_ |
7 | 7 |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 | 9 |
10 #include "base/scoped_nsobject.h" | 10 #include "base/scoped_nsobject.h" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 // YES if we've successfully completed the initial layout. When this is | 80 // YES if we've successfully completed the initial layout. When this is |
81 // NO, we probably don't want to do any animation because we're just coming | 81 // NO, we probably don't want to do any animation because we're just coming |
82 // into being. | 82 // into being. |
83 BOOL initialLayoutComplete_; | 83 BOOL initialLayoutComplete_; |
84 | 84 |
85 // Width available for resizing the tabs (doesn't include the new tab | 85 // Width available for resizing the tabs (doesn't include the new tab |
86 // button). Used to restrict the available width when closing many tabs at | 86 // button). Used to restrict the available width when closing many tabs at |
87 // once to prevent them from resizing to fit the full width. If the entire | 87 // once to prevent them from resizing to fit the full width. If the entire |
88 // width should be used, this will have a value of |kUseFullAvailableWidth|. | 88 // width should be used, this will have a value of |kUseFullAvailableWidth|. |
89 float availableResizeWidth_; | 89 float availableResizeWidth_; |
| 90 |
| 91 // Width the last tab should get in layout. Only non-null when |
| 92 // |availableResizeWidth_| is not equal to |kUseFullAvailableWidth|. |
| 93 scoped_ptr<CGFloat> lastClosedTabWidth_; |
| 94 |
90 // A tracking area that's the size of the tab strip used to be notified | 95 // A tracking area that's the size of the tab strip used to be notified |
91 // when the mouse moves in the tab strip | 96 // when the mouse moves in the tab strip |
92 scoped_nsobject<NSTrackingArea> trackingArea_; | 97 scoped_nsobject<NSTrackingArea> trackingArea_; |
93 TabView* hoveredTab_; // weak. Tab that the mouse is hovering over | 98 TabView* hoveredTab_; // weak. Tab that the mouse is hovering over |
94 | 99 |
95 // Array of subviews which are permanent (and which should never be removed), | 100 // Array of subviews which are permanent (and which should never be removed), |
96 // such as the new-tab button, but *not* the tabs themselves. | 101 // such as the new-tab button, but *not* the tabs themselves. |
97 scoped_nsobject<NSMutableArray> permanentSubviews_; | 102 scoped_nsobject<NSMutableArray> permanentSubviews_; |
98 | 103 |
99 // The default favicon, so we can use one copy for all buttons. | 104 // The default favicon, so we can use one copy for all buttons. |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 - (void)removeConstrainedWindow:(ConstrainedWindowMac*)window; | 209 - (void)removeConstrainedWindow:(ConstrainedWindowMac*)window; |
205 - (void)updateDevToolsForContents:(TabContents*)contents; | 210 - (void)updateDevToolsForContents:(TabContents*)contents; |
206 | 211 |
207 @end | 212 @end |
208 | 213 |
209 // Notification sent when the number of tabs changes. The object will be this | 214 // Notification sent when the number of tabs changes. The object will be this |
210 // controller. | 215 // controller. |
211 extern NSString* const kTabStripNumberOfTabsChanged; | 216 extern NSString* const kTabStripNumberOfTabsChanged; |
212 | 217 |
213 #endif // CHROME_BROWSER_COCOA_TAB_STRIP_CONTROLLER_H_ | 218 #endif // CHROME_BROWSER_COCOA_TAB_STRIP_CONTROLLER_H_ |
OLD | NEW |