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_BROWSER_WINDOW_CONTROLLER_PRIVATE_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_PRIVATE_H_ |
6 #define CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_PRIVATE_H_ | 6 #define CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_PRIVATE_H_ |
7 | 7 |
8 #import "chrome/browser/ui/cocoa/browser_window_controller.h" | 8 #import "chrome/browser/ui/cocoa/browser_window_controller.h" |
9 #import "chrome/browser/ui/cocoa/browser_window_layout.h" | 9 #import "chrome/browser/ui/cocoa/browser_window_layout.h" |
10 #import "chrome/browser/ui/cocoa/presentation_mode_controller.h" | 10 #import "chrome/browser/ui/cocoa/presentation_mode_controller.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 // methods used only by single parts should be declared in their own file. | 21 // methods used only by single parts should be declared in their own file. |
22 // TODO(viettrungluu): [crbug.com/35543] work on splitting out stuff from the | 22 // TODO(viettrungluu): [crbug.com/35543] work on splitting out stuff from the |
23 // BWC, and figuring out which methods belong here (need to unravel | 23 // BWC, and figuring out which methods belong here (need to unravel |
24 // "dependencies"). | 24 // "dependencies"). |
25 @interface BrowserWindowController(Private) | 25 @interface BrowserWindowController(Private) |
26 | 26 |
27 // Create the appropriate tab strip controller based on whether or not side | 27 // Create the appropriate tab strip controller based on whether or not side |
28 // tabs are enabled. Replaces the current controller. | 28 // tabs are enabled. Replaces the current controller. |
29 - (void)createTabStripController; | 29 - (void)createTabStripController; |
30 | 30 |
| 31 // Sets the window's collection behavior to the appropriate |
| 32 // fullscreen behavior. |
| 33 - (void)updateFullscreenCollectionBehavior; |
| 34 |
31 // Saves the window's position in the local state preferences. | 35 // Saves the window's position in the local state preferences. |
32 - (void)saveWindowPositionIfNeeded; | 36 - (void)saveWindowPositionIfNeeded; |
33 | 37 |
34 // We need to adjust where sheets come out of the window, as by default they | 38 // We need to adjust where sheets come out of the window, as by default they |
35 // erupt from the omnibox, which is rather weird. | 39 // erupt from the omnibox, which is rather weird. |
36 - (NSRect)window:(NSWindow*)window | 40 - (NSRect)window:(NSWindow*)window |
37 willPositionSheet:(NSWindow*)sheet | 41 willPositionSheet:(NSWindow*)sheet |
38 usingRect:(NSRect)defaultSheetRect; | 42 usingRect:(NSRect)defaultSheetRect; |
39 | 43 |
40 // Repositions the window's subviews. From the top down: toolbar, normal | 44 // Repositions the window's subviews. From the top down: toolbar, normal |
41 // bookmark bar (if shown), infobar, NTP detached bookmark bar (if shown), | 45 // bookmark bar (if shown), infobar, NTP detached bookmark bar (if shown), |
42 // content area, download shelf (if any). | 46 // content area, download shelf (if any). |
43 - (void)layoutSubviews; | 47 - (void)layoutSubviews; |
44 | 48 |
45 // Shows the informational "how to exit fullscreen" bubble. | 49 // Shows the informational "how to exit fullscreen" bubble. |
46 - (void)showFullscreenExitBubbleIfNecessary; | 50 - (void)showFullscreenExitBubbleIfNecessary; |
47 | 51 |
48 // Lays out the tab strip and avatar button. | 52 // Lays out the tab strip and avatar button. |
49 - (void)applyTabStripLayout:(const chrome::TabStripLayout&)layout; | 53 - (void)applyTabStripLayout:(const chrome::TabStripLayout&)layout; |
50 | 54 |
51 // Returns YES if the bookmark bar should be placed below the infobar, NO | 55 // Returns YES if the bookmark bar should be placed below the infobar, NO |
52 // otherwise. | 56 // otherwise. |
53 - (BOOL)placeBookmarkBarBelowInfoBar; | 57 - (BOOL)placeBookmarkBarBelowInfoBar; |
54 | 58 |
55 | |
56 // Lays out the tab content area in the given frame. If the height changes, | 59 // Lays out the tab content area in the given frame. If the height changes, |
57 // sends a message to the renderer to resize. | 60 // sends a message to the renderer to resize. |
58 - (void)layoutTabContentArea:(NSRect)frame; | 61 - (void)layoutTabContentArea:(NSRect)frame; |
59 | 62 |
60 // Sets the toolbar's height to a value appropriate for the given compression. | 63 // Sets the toolbar's height to a value appropriate for the given compression. |
61 // Also adjusts the bookmark bar's height by the opposite amount in order to | 64 // Also adjusts the bookmark bar's height by the opposite amount in order to |
62 // keep the total height of the two views constant. | 65 // keep the total height of the two views constant. |
63 - (void)adjustToolbarAndBookmarkBarForCompression:(CGFloat)compression; | 66 - (void)adjustToolbarAndBookmarkBarForCompression:(CGFloat)compression; |
64 | 67 |
65 // Moves views between windows in preparation for fullscreen mode when not using | 68 // Moves views between windows in preparation for fullscreen mode when not using |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 - (void)adjustUIForEnteringFullscreen; | 198 - (void)adjustUIForEnteringFullscreen; |
196 | 199 |
197 // Returns YES if the fullscreen is for tab content. | 200 // Returns YES if the fullscreen is for tab content. |
198 - (BOOL)isFullscreenForTabContent; | 201 - (BOOL)isFullscreenForTabContent; |
199 | 202 |
200 #endif | 203 #endif |
201 | 204 |
202 @end // @interface BrowserWindowController(Private) | 205 @end // @interface BrowserWindowController(Private) |
203 | 206 |
204 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_PRIVATE_H_ | 207 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_PRIVATE_H_ |
OLD | NEW |