| 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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 | 150 |
| 151 // Returns the index of the subview |view|. Returns -1 if not present. Takes | 151 // Returns the index of the subview |view|. Returns -1 if not present. Takes |
| 152 // closing tabs into account such that this index will correctly match the tab | 152 // closing tabs into account such that this index will correctly match the tab |
| 153 // model. If |view| is in the process of closing, returns -1, as closing tabs | 153 // model. If |view| is in the process of closing, returns -1, as closing tabs |
| 154 // are no longer in the model. | 154 // are no longer in the model. |
| 155 - (NSInteger)modelIndexForTabView:(NSView*)view; | 155 - (NSInteger)modelIndexForTabView:(NSView*)view; |
| 156 | 156 |
| 157 // Return the view at a given index. | 157 // Return the view at a given index. |
| 158 - (NSView*)viewAtIndex:(NSUInteger)index; | 158 - (NSView*)viewAtIndex:(NSUInteger)index; |
| 159 | 159 |
| 160 // Return the number of tab views in the tab strip. It's same as number of tabs |
| 161 // in the model, except when a tab is closing, which will be counted in views |
| 162 // count, but no longer in the model. |
| 163 - (NSUInteger)viewsCount; |
| 164 |
| 160 // Set the placeholder for a dragged tab, allowing the |frame| and |strechiness| | 165 // Set the placeholder for a dragged tab, allowing the |frame| and |strechiness| |
| 161 // to be specified. This causes this tab to be rendered in an arbitrary position | 166 // to be specified. This causes this tab to be rendered in an arbitrary position |
| 162 - (void)insertPlaceholderForTab:(TabView*)tab | 167 - (void)insertPlaceholderForTab:(TabView*)tab |
| 163 frame:(NSRect)frame | 168 frame:(NSRect)frame |
| 164 yStretchiness:(CGFloat)yStretchiness; | 169 yStretchiness:(CGFloat)yStretchiness; |
| 165 | 170 |
| 166 // Returns whether or not |tab| can still be fully seen in the tab strip or if | 171 // Returns whether or not |tab| can still be fully seen in the tab strip or if |
| 167 // its current position would cause it be obscured by things such as the edge | 172 // its current position would cause it be obscured by things such as the edge |
| 168 // of the window or the window decorations. Returns YES only if the entire tab | 173 // of the window or the window decorations. Returns YES only if the entire tab |
| 169 // is visible. | 174 // is visible. |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 - (void)removeConstrainedWindow:(ConstrainedWindowMac*)window; | 218 - (void)removeConstrainedWindow:(ConstrainedWindowMac*)window; |
| 214 - (void)updateDevToolsForContents:(TabContents*)contents; | 219 - (void)updateDevToolsForContents:(TabContents*)contents; |
| 215 | 220 |
| 216 @end | 221 @end |
| 217 | 222 |
| 218 // Notification sent when the number of tabs changes. The object will be this | 223 // Notification sent when the number of tabs changes. The object will be this |
| 219 // controller. | 224 // controller. |
| 220 extern NSString* const kTabStripNumberOfTabsChanged; | 225 extern NSString* const kTabStripNumberOfTabsChanged; |
| 221 | 226 |
| 222 #endif // CHROME_BROWSER_COCOA_TAB_STRIP_CONTROLLER_H_ | 227 #endif // CHROME_BROWSER_COCOA_TAB_STRIP_CONTROLLER_H_ |
| OLD | NEW |