Chromium Code Reviews| 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_TAB_WINDOW_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_TAB_WINDOW_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_TAB_WINDOW_CONTROLLER_H_ | 6 #define CHROME_BROWSER_TAB_WINDOW_CONTROLLER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 // A class acting as the Objective-C window controller for a window that has | 9 // A class acting as the Objective-C window controller for a window that has |
| 10 // tabs which can be dragged around. Tabs can be re-arranged within the same | 10 // tabs which can be dragged around. Tabs can be re-arranged within the same |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 27 // window's content area. It will be stretched to fill the window's height. | 27 // window's content area. It will be stretched to fill the window's height. |
| 28 | 28 |
| 29 #import <Cocoa/Cocoa.h> | 29 #import <Cocoa/Cocoa.h> |
| 30 | 30 |
| 31 #import "base/cocoa_protocols_mac.h" | 31 #import "base/cocoa_protocols_mac.h" |
| 32 #include "base/scoped_nsobject.h" | 32 #include "base/scoped_nsobject.h" |
| 33 | 33 |
| 34 @class FastResizeView; | 34 @class FastResizeView; |
| 35 @class TabStripView; | 35 @class TabStripView; |
| 36 @class TabView; | 36 @class TabView; |
| 37 @class PopupStripView; | |
|
viettrungluu
2010/08/20 17:02:00
alphabetical order
| |
| 37 | 38 |
| 38 @interface TabWindowController : NSWindowController<NSWindowDelegate> { | 39 @interface TabWindowController : NSWindowController<NSWindowDelegate> { |
| 39 @private | 40 @private |
| 40 IBOutlet FastResizeView* tabContentArea_; | 41 IBOutlet FastResizeView* tabContentArea_; |
| 41 // TODO(pinkerton): Figure out a better way to initialize one or the other | 42 // TODO(pinkerton): Figure out a better way to initialize one or the other |
| 42 // w/out needing both to be in the nib. | 43 // w/out needing both to be in the nib. |
| 43 IBOutlet TabStripView* topTabStripView_; | 44 IBOutlet TabStripView* topTabStripView_; |
| 44 IBOutlet TabStripView* sideTabStripView_; | 45 IBOutlet TabStripView* sideTabStripView_; |
| 46 IBOutlet PopupStripView* popupStripView_; | |
| 45 NSWindow* overlayWindow_; // Used during dragging for window opacity tricks | 47 NSWindow* overlayWindow_; // Used during dragging for window opacity tricks |
| 46 NSView* cachedContentView_; // Used during dragging for identifying which | 48 NSView* cachedContentView_; // Used during dragging for identifying which |
| 47 // view is the proper content area in the overlay | 49 // view is the proper content area in the overlay |
| 48 // (weak) | 50 // (weak) |
| 49 scoped_nsobject<NSMutableSet> lockedTabs_; | 51 scoped_nsobject<NSMutableSet> lockedTabs_; |
| 50 BOOL closeDeferred_; // If YES, call performClose: in removeOverlay:. | 52 BOOL closeDeferred_; // If YES, call performClose: in removeOverlay:. |
| 51 // Difference between height of window content area and height of the | 53 // Difference between height of window content area and height of the |
| 52 // |tabContentArea_|. Calculated when the window is loaded from the nib and | 54 // |tabContentArea_|. Calculated when the window is loaded from the nib and |
| 53 // cached in order to restore the delta when switching tab modes. | 55 // cached in order to restore the delta when switching tab modes. |
| 54 CGFloat contentAreaHeightDelta_; | 56 CGFloat contentAreaHeightDelta_; |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 163 // put into a different tab strip, such as during a drop on another window. | 165 // put into a different tab strip, such as during a drop on another window. |
| 164 - (void)detachTabView:(NSView*)view; | 166 - (void)detachTabView:(NSView*)view; |
| 165 | 167 |
| 166 // Toggles from one display mode of the tab strip to another. Will automatically | 168 // Toggles from one display mode of the tab strip to another. Will automatically |
| 167 // call -layoutSubviews to reposition other content. | 169 // call -layoutSubviews to reposition other content. |
| 168 - (void)toggleTabStripDisplayMode; | 170 - (void)toggleTabStripDisplayMode; |
| 169 | 171 |
| 170 // Called when the size of the window content area has changed. Override to | 172 // Called when the size of the window content area has changed. Override to |
| 171 // position specific views. Base class implementation does nothing. | 173 // position specific views. Base class implementation does nothing. |
| 172 - (void)layoutSubviews; | 174 - (void)layoutSubviews; |
| 175 | |
| 176 // Returns a context menu for popup (non-tab) window. | |
|
viettrungluu
2010/08/20 17:02:00
It's just a tad strange that you're talking about
| |
| 177 - (NSMenu*)popupContextMenu; | |
| 173 @end | 178 @end |
| 174 | 179 |
| 175 #endif // CHROME_BROWSER_TAB_WINDOW_CONTROLLER_H_ | 180 #endif // CHROME_BROWSER_TAB_WINDOW_CONTROLLER_H_ |
| OLD | NEW |