| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 switchView:(NSView*)switchView | 62 switchView:(NSView*)switchView |
| 63 model:(TabStripModel*)model; | 63 model:(TabStripModel*)model; |
| 64 | 64 |
| 65 // Return the rect, in WebKit coordinates (flipped), of the window's grow box | 65 // Return the rect, in WebKit coordinates (flipped), of the window's grow box |
| 66 // in the coordinate system of the content area of the currently selected tab. | 66 // in the coordinate system of the content area of the currently selected tab. |
| 67 - (NSRect)selectedTabGrowBoxRect; | 67 - (NSRect)selectedTabGrowBoxRect; |
| 68 | 68 |
| 69 // Return the view for the currently selected tab. | 69 // Return the view for the currently selected tab. |
| 70 - (NSView *)selectedTabView; | 70 - (NSView *)selectedTabView; |
| 71 | 71 |
| 72 // Drop a tab view at a new index in the array. | 72 // Move the given tab at index |from| in this window to the location of the |
| 73 - (void)dropTabView:(NSView *)view atIndex:(NSUInteger)index; | 73 // current placeholder. |
| 74 - (void)moveTabFromIndex:(NSInteger)from; |
| 75 |
| 76 // Drop a given TabContents at the location of the current placeholder. If there |
| 77 // is no placeholder, it will go at the end. Used when dragging from another |
| 78 // window when we don't have access to the TabContents as part of our strip. |
| 79 - (void)dropTabContents:(TabContents*)contents; |
| 74 | 80 |
| 75 // Given a tab view in the strip, return its index. Returns -1 if not present. | 81 // Given a tab view in the strip, return its index. Returns -1 if not present. |
| 76 - (NSInteger)indexForTabView:(NSView*)view; | 82 - (NSInteger)indexForTabView:(NSView*)view; |
| 77 | 83 |
| 78 // return the view at a given index | 84 // return the view at a given index |
| 79 - (NSView*)viewAtIndex:(NSUInteger)index; | 85 - (NSView*)viewAtIndex:(NSUInteger)index; |
| 80 | 86 |
| 81 // Set the placeholder for a dragged tab, allowing the |frame| and |strechiness| | 87 // Set the placeholder for a dragged tab, allowing the |frame| and |strechiness| |
| 82 // to be specified. This causes this tab to be rendered in an arbitrary position | 88 // to be specified. This causes this tab to be rendered in an arbitrary position |
| 83 - (void)insertPlaceholderForTab:(TabView*)tab | 89 - (void)insertPlaceholderForTab:(TabView*)tab |
| 84 frame:(NSRect)frame | 90 frame:(NSRect)frame |
| 85 yStretchiness:(CGFloat)yStretchiness; | 91 yStretchiness:(CGFloat)yStretchiness; |
| 86 | 92 |
| 87 // Force the tabs to rearrange themselves to reflect the current model | 93 // Force the tabs to rearrange themselves to reflect the current model |
| 88 - (void)layoutTabs; | 94 - (void)layoutTabs; |
| 89 | 95 |
| 90 // Default height for tabs. | 96 // Default height for tabs. |
| 91 + (CGFloat)defaultTabHeight; | 97 + (CGFloat)defaultTabHeight; |
| 92 @end | 98 @end |
| 93 | 99 |
| 94 #endif // CHROME_BROWSER_COCOA_TAB_STRIP_CONTROLLER_H_ | 100 #endif // CHROME_BROWSER_COCOA_TAB_STRIP_CONTROLLER_H_ |
| OLD | NEW |