| 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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 | 129 |
| 130 // Move the given tab at index |from| in this window to the location of the | 130 // Move the given tab at index |from| in this window to the location of the |
| 131 // current placeholder. | 131 // current placeholder. |
| 132 - (void)moveTabFromIndex:(NSInteger)from; | 132 - (void)moveTabFromIndex:(NSInteger)from; |
| 133 | 133 |
| 134 // Drop a given TabContents at the location of the current placeholder. If there | 134 // Drop a given TabContents at the location of the current placeholder. If there |
| 135 // is no placeholder, it will go at the end. Used when dragging from another | 135 // is no placeholder, it will go at the end. Used when dragging from another |
| 136 // window when we don't have access to the TabContents as part of our strip. | 136 // window when we don't have access to the TabContents as part of our strip. |
| 137 // |frame| is in the coordinate system of the tab strip view and represents | 137 // |frame| is in the coordinate system of the tab strip view and represents |
| 138 // where the user dropped the new tab so it can be animated into its correct | 138 // where the user dropped the new tab so it can be animated into its correct |
| 139 // location when the tab is added to the model. | 139 // location when the tab is added to the model. If the tab was pinned in its |
| 140 - (void)dropTabContents:(TabContents*)contents withFrame:(NSRect)frame; | 140 // previous window, setting |pinned| to YES will propagate that state to the |
| 141 // new window. Mini-tabs are either app or pinned tabs; the app state is stored |
| 142 // by the |contents|, but the |pinned| state is the caller's responsibility. |
| 143 - (void)dropTabContents:(TabContents*)contents |
| 144 withFrame:(NSRect)frame |
| 145 asPinnedTab:(BOOL)pinned; |
| 141 | 146 |
| 142 // Returns the index of the subview |view|. Returns -1 if not present. Takes | 147 // Returns the index of the subview |view|. Returns -1 if not present. Takes |
| 143 // closing tabs into account such that this index will correctly match the tab | 148 // closing tabs into account such that this index will correctly match the tab |
| 144 // model. If |view| is in the process of closing, returns -1, as closing tabs | 149 // model. If |view| is in the process of closing, returns -1, as closing tabs |
| 145 // are no longer in the model. | 150 // are no longer in the model. |
| 146 - (NSInteger)modelIndexForTabView:(NSView*)view; | 151 - (NSInteger)modelIndexForTabView:(NSView*)view; |
| 147 | 152 |
| 148 // Return the view at a given index. | 153 // Return the view at a given index. |
| 149 - (NSView*)viewAtIndex:(NSUInteger)index; | 154 - (NSView*)viewAtIndex:(NSUInteger)index; |
| 150 | 155 |
| (...skipping 53 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 |