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_WINDOW_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_TABS_TAB_WINDOW_CONTROLLER_H_ |
6 #define CHROME_BROWSER_UI_COCOA_TABS_TAB_WINDOW_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_COCOA_TABS_TAB_WINDOW_CONTROLLER_H_ |
7 | 7 |
8 // A class acting as the Objective-C window controller for a window that has | 8 // A class acting as the Objective-C window controller for a window that has |
9 // tabs which can be dragged around. Tabs can be re-arranged within the same | 9 // tabs which can be dragged around. Tabs can be re-arranged within the same |
10 // window or dragged into other TabWindowController windows. This class doesn't | 10 // window or dragged into other TabWindowController windows. This class doesn't |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 - (BOOL)hasTabStrip; | 134 - (BOOL)hasTabStrip; |
135 | 135 |
136 // Gets whether a particular tab is draggable between windows. | 136 // Gets whether a particular tab is draggable between windows. |
137 - (BOOL)isTabDraggable:(NSView*)tabView; | 137 - (BOOL)isTabDraggable:(NSView*)tabView; |
138 | 138 |
139 // Tell the window that it needs to call performClose: as soon as the current | 139 // Tell the window that it needs to call performClose: as soon as the current |
140 // drag is complete. This prevents a window (and its overlay) from going away | 140 // drag is complete. This prevents a window (and its overlay) from going away |
141 // during a drag. | 141 // during a drag. |
142 - (void)deferPerformClose; | 142 - (void)deferPerformClose; |
143 | 143 |
| 144 // There are 2 view hierarchy constraints that must be enforced: |
| 145 // - The tab strip must be above the content view. |
| 146 // - The tab strip must be below the traffic lights. |
| 147 // AppKit does not enforce these constraints, because it assumes that Chrome |
| 148 // does not mess with the NSThemeFrame. Chrome must manually enforce these |
| 149 // constraints. |
| 150 // |
| 151 // Immediately after creation of the window, or after the window's content view |
| 152 // is changed, the content view must be moved to the back. |
| 153 - (void)moveContentViewToBack:(NSView*)contentView; |
| 154 |
| 155 // The tab strip should always be inserted directly above the content view. |
| 156 - (void)insertTabStripView:(NSView*)tabStripView intoWindow:(NSWindow*)window; |
| 157 |
144 @end | 158 @end |
145 | 159 |
146 @interface TabWindowController(ProtectedMethods) | 160 @interface TabWindowController(ProtectedMethods) |
147 // Tells the tab strip to forget about this tab in preparation for it being | 161 // Tells the tab strip to forget about this tab in preparation for it being |
148 // put into a different tab strip, such as during a drop on another window. | 162 // put into a different tab strip, such as during a drop on another window. |
149 - (void)detachTabView:(NSView*)view; | 163 - (void)detachTabView:(NSView*)view; |
150 | 164 |
151 // Called when the size of the window content area has changed. Override to | 165 // Called when the size of the window content area has changed. Override to |
152 // position specific views. Base class implementation does nothing. | 166 // position specific views. Base class implementation does nothing. |
153 - (void)layoutSubviews; | 167 - (void)layoutSubviews; |
154 @end | 168 @end |
155 | 169 |
156 #endif // CHROME_BROWSER_UI_COCOA_TABS_TAB_WINDOW_CONTROLLER_H_ | 170 #endif // CHROME_BROWSER_UI_COCOA_TABS_TAB_WINDOW_CONTROLLER_H_ |
OLD | NEW |