Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(224)

Side by Side Diff: chrome/browser/ui/cocoa/tabs/tab_window_controller.h

Issue 10870094: Constrained window sheet controller (test patch) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rename Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 18 matching lines...) Expand all
29 29
30 @interface TabWindowController : NSWindowController<NSWindowDelegate> { 30 @interface TabWindowController : NSWindowController<NSWindowDelegate> {
31 @private 31 @private
32 IBOutlet FastResizeView* tabContentArea_; 32 IBOutlet FastResizeView* tabContentArea_;
33 IBOutlet TabStripView* tabStripView_; 33 IBOutlet TabStripView* tabStripView_;
34 NSWindow* overlayWindow_; // Used during dragging for window opacity tricks 34 NSWindow* overlayWindow_; // Used during dragging for window opacity tricks
35 NSView* cachedContentView_; // Used during dragging for identifying which 35 NSView* cachedContentView_; // Used during dragging for identifying which
36 // view is the proper content area in the overlay 36 // view is the proper content area in the overlay
37 // (weak) 37 // (weak)
38 scoped_nsobject<FocusTracker> focusBeforeOverlay_; 38 scoped_nsobject<FocusTracker> focusBeforeOverlay_;
39 scoped_nsobject<NSMutableSet> lockedTabs_;
40 BOOL closeDeferred_; // If YES, call performClose: in removeOverlay:. 39 BOOL closeDeferred_; // If YES, call performClose: in removeOverlay:.
41 // Difference between height of window content area and height of the 40 // Difference between height of window content area and height of the
42 // |tabContentArea_|. Calculated when the window is loaded from the nib and 41 // |tabContentArea_|. Calculated when the window is loaded from the nib and
43 // cached in order to restore the delta when switching tab modes. 42 // cached in order to restore the delta when switching tab modes.
44 CGFloat contentAreaHeightDelta_; 43 CGFloat contentAreaHeightDelta_;
45 } 44 }
46 @property(readonly, nonatomic) TabStripView* tabStripView; 45 @property(readonly, nonatomic) TabStripView* tabStripView;
47 @property(readonly, nonatomic) FastResizeView* tabContentArea; 46 @property(readonly, nonatomic) FastResizeView* tabContentArea;
48 47
49 // Used during tab dragging to turn on/off the overlay window when a tab 48 // Used during tab dragging to turn on/off the overlay window when a tab
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 // Return the view of the active tab. 125 // Return the view of the active tab.
127 - (NSView*)activeTabView; 126 - (NSView*)activeTabView;
128 127
129 // The title of the active tab. 128 // The title of the active tab.
130 - (NSString*)activeTabTitle; 129 - (NSString*)activeTabTitle;
131 130
132 // Called to check whether or not this controller's window has a tab strip (YES 131 // Called to check whether or not this controller's window has a tab strip (YES
133 // if it does, NO otherwise). The default implementation returns YES. 132 // if it does, NO otherwise). The default implementation returns YES.
134 - (BOOL)hasTabStrip; 133 - (BOOL)hasTabStrip;
135 134
136 // Get/set whether a particular tab is draggable between windows. 135 // Gets whether a particular tab is draggable between windows.
137 - (BOOL)isTabDraggable:(NSView*)tabView; 136 - (BOOL)isTabDraggable:(NSView*)tabView;
138 - (void)setTab:(NSView*)tabView isDraggable:(BOOL)draggable;
139 137
140 // Tell the window that it needs to call performClose: as soon as the current 138 // Tell the window that it needs to call performClose: as soon as the current
141 // drag is complete. This prevents a window (and its overlay) from going away 139 // drag is complete. This prevents a window (and its overlay) from going away
142 // during a drag. 140 // during a drag.
143 - (void)deferPerformClose; 141 - (void)deferPerformClose;
144 142
145 @end 143 @end
146 144
147 @interface TabWindowController(ProtectedMethods) 145 @interface TabWindowController(ProtectedMethods)
148 // Tells the tab strip to forget about this tab in preparation for it being 146 // Tells the tab strip to forget about this tab in preparation for it being
149 // put into a different tab strip, such as during a drop on another window. 147 // put into a different tab strip, such as during a drop on another window.
150 - (void)detachTabView:(NSView*)view; 148 - (void)detachTabView:(NSView*)view;
151 149
152 // Called when the size of the window content area has changed. Override to 150 // Called when the size of the window content area has changed. Override to
153 // position specific views. Base class implementation does nothing. 151 // position specific views. Base class implementation does nothing.
154 - (void)layoutSubviews; 152 - (void)layoutSubviews;
155 @end 153 @end
156 154
157 #endif // CHROME_BROWSER_UI_COCOA_TABS_TAB_WINDOW_CONTROLLER_H_ 155 #endif // CHROME_BROWSER_UI_COCOA_TABS_TAB_WINDOW_CONTROLLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm ('k') | chrome/browser/ui/cocoa/tabs/tab_window_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698