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 |
11 // know anything about the actual tab implementation or model, as that is fairly | 11 // know anything about the actual tab implementation or model, as that is fairly |
12 // application-specific. It only provides an API to be overridden by subclasses | 12 // application-specific. It only provides an API to be overridden by subclasses |
13 // to fill in the details. | 13 // to fill in the details. |
14 // | 14 // |
15 // This assumes that there will be a view in the nib, connected to | 15 // This assumes that there will be a view in the nib, connected to |
16 // |tabContentArea_|, that indicates the content that it switched when switching | 16 // |tabContentArea_|, that indicates the content that it switched when switching |
17 // between tabs. It needs to be a regular NSView, not something like an NSBox | 17 // between tabs. It needs to be a regular NSView, not something like an NSBox |
18 // because the TabStripController makes certain assumptions about how it can | 18 // because the TabStripController makes certain assumptions about how it can |
19 // swap out subviews. | 19 // swap out subviews. |
20 | 20 |
21 #import <Cocoa/Cocoa.h> | 21 #import <Cocoa/Cocoa.h> |
22 | 22 |
23 #import "base/mac/cocoa_protocols.h" | |
24 #include "base/memory/scoped_nsobject.h" | 23 #include "base/memory/scoped_nsobject.h" |
25 | 24 |
26 @class FastResizeView; | 25 @class FastResizeView; |
27 @class FocusTracker; | 26 @class FocusTracker; |
28 @class TabStripView; | 27 @class TabStripView; |
29 @class TabView; | 28 @class TabView; |
30 | 29 |
31 @interface TabWindowController : NSWindowController<NSWindowDelegate> { | 30 @interface TabWindowController : NSWindowController<NSWindowDelegate> { |
32 @private | 31 @private |
33 IBOutlet FastResizeView* tabContentArea_; | 32 IBOutlet FastResizeView* tabContentArea_; |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 // Tells the tab strip to forget about this tab in preparation for it being | 148 // Tells the tab strip to forget about this tab in preparation for it being |
150 // put into a different tab strip, such as during a drop on another window. | 149 // put into a different tab strip, such as during a drop on another window. |
151 - (void)detachTabView:(NSView*)view; | 150 - (void)detachTabView:(NSView*)view; |
152 | 151 |
153 // Called when the size of the window content area has changed. Override to | 152 // Called when the size of the window content area has changed. Override to |
154 // position specific views. Base class implementation does nothing. | 153 // position specific views. Base class implementation does nothing. |
155 - (void)layoutSubviews; | 154 - (void)layoutSubviews; |
156 @end | 155 @end |
157 | 156 |
158 #endif // CHROME_BROWSER_UI_COCOA_TABS_TAB_WINDOW_CONTROLLER_H_ | 157 #endif // CHROME_BROWSER_UI_COCOA_TABS_TAB_WINDOW_CONTROLLER_H_ |
OLD | NEW |