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

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

Issue 1881093002: Implement Tab Detaching in Fullscreen Mode on Mac OSX (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add to the histogram Created 4 years, 8 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
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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 // Move given tab views to the location of the current placeholder. If there is 116 // Move given tab views to the location of the current placeholder. If there is
117 // no placeholder, it will go at the end. |controller| is the window controller 117 // no placeholder, it will go at the end. |controller| is the window controller
118 // of a tab being dropped from a different window. It will be nil if the drag is 118 // of a tab being dropped from a different window. It will be nil if the drag is
119 // within the window, otherwise the tab is removed from that window before being 119 // within the window, otherwise the tab is removed from that window before being
120 // placed into this one. The implementation will call |-removePlaceholder| since 120 // placed into this one. The implementation will call |-removePlaceholder| since
121 // the drag is now complete. This also calls |-layoutTabs| internally so 121 // the drag is now complete. This also calls |-layoutTabs| internally so
122 // clients do not need to call it again. 122 // clients do not need to call it again.
123 - (void)moveTabViews:(NSArray*)views 123 - (void)moveTabViews:(NSArray*)views
124 fromController:(TabWindowController*)controller; 124 fromController:(TabWindowController*)controller;
125 125
126 // Called if the tab is in a detached window and has finished dragging.
127 // If the source window is in fullscreen, the detached window will also
128 // enter fullscreen.
129 - (void)detachedWindowEnterFullscreenIfNeeded:(TabWindowController*)source;
130
126 // Number of tabs in the tab strip. Useful, for example, to know if we're 131 // Number of tabs in the tab strip. Useful, for example, to know if we're
127 // dragging the only tab in the window. This includes pinned tabs (both live 132 // dragging the only tab in the window. This includes pinned tabs (both live
128 // and not). 133 // and not).
129 - (NSInteger)numberOfTabs; 134 - (NSInteger)numberOfTabs;
130 135
131 // YES if there are tabs in the tab strip which have content, allowing for 136 // YES if there are tabs in the tab strip which have content, allowing for
132 // the notion of tabs in the tab strip that are placeholders but currently have 137 // the notion of tabs in the tab strip that are placeholders but currently have
133 // no content. 138 // no content.
134 - (BOOL)hasLiveTabs; 139 - (BOOL)hasLiveTabs;
135 140
136 // Returns all tab views. 141 // Returns all tab views.
137 - (NSArray*)tabViews; 142 - (NSArray*)tabViews;
138 143
139 // Return the view of the active tab. 144 // Return the view of the active tab.
140 - (NSView*)activeTabView; 145 - (NSView*)activeTabView;
141 146
142 // The title of the active tab. 147 // The title of the active tab.
143 - (NSString*)activeTabTitle; 148 - (NSString*)activeTabTitle;
144 149
145 // Called to check whether or not this controller's window has a tab strip (YES 150 // Called to check whether or not this controller's window has a tab strip (YES
146 // if it does, NO otherwise). The default implementation returns YES. 151 // if it does, NO otherwise). The default implementation returns YES.
147 - (BOOL)hasTabStrip; 152 - (BOOL)hasTabStrip;
148 153
149 // Gets whether a particular tab is draggable between windows. 154 // Gets whether a particular tab is draggable between windows.
150 - (BOOL)isTabDraggable:(NSView*)tabView; 155 - (BOOL)isTabDraggable:(NSView*)tabView;
151 156
157 // In any fullscreen mode, the y offset to use for the content at the top of
158 // the screen (tab strip, omnibox, bookmark bar, etc). Ranges from 0 to -22.
159 - (CGFloat)menubarOffset;
160
152 // Tell the window that it needs to call performClose: as soon as the current 161 // Tell the window that it needs to call performClose: as soon as the current
153 // drag is complete. This prevents a window (and its overlay) from going away 162 // drag is complete. This prevents a window (and its overlay) from going away
154 // during a drag. 163 // during a drag.
155 - (void)deferPerformClose; 164 - (void)deferPerformClose;
156 165
157 @end 166 @end
158 167
159 @interface TabWindowController(ProtectedMethods) 168 @interface TabWindowController(ProtectedMethods)
160 // Tells the tab strip to forget about this tab in preparation for it being 169 // Tells the tab strip to forget about this tab in preparation for it being
161 // put into a different tab strip, such as during a drop on another window. 170 // put into a different tab strip, such as during a drop on another window.
162 - (void)detachTabView:(NSView*)view; 171 - (void)detachTabView:(NSView*)view;
163 172
164 // Called when the size of the window content area has changed. Override to 173 // Called when the size of the window content area has changed. Override to
165 // position specific views. Base class implementation does nothing. 174 // position specific views. Base class implementation does nothing.
166 - (void)layoutSubviews; 175 - (void)layoutSubviews;
167 @end 176 @end
168 177
169 #endif // CHROME_BROWSER_UI_COCOA_TABS_TAB_WINDOW_CONTROLLER_H_ 178 #endif // CHROME_BROWSER_UI_COCOA_TABS_TAB_WINDOW_CONTROLLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/tabs/tab_strip_drag_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