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 | 9 |
10 // Private methods for the |BrowserWindowController|. This category should | 10 // Private methods for the |BrowserWindowController|. This category should |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 // does not position views; callers must also call |-layoutSubviews:|. | 105 // does not position views; callers must also call |-layoutSubviews:|. |
106 - (void)moveViewsForImmersiveFullscreen:(BOOL)fullscreen | 106 - (void)moveViewsForImmersiveFullscreen:(BOOL)fullscreen |
107 regularWindow:(NSWindow*)regularWindow | 107 regularWindow:(NSWindow*)regularWindow |
108 fullscreenWindow:(NSWindow*)fullscreenWindow; | 108 fullscreenWindow:(NSWindow*)fullscreenWindow; |
109 | 109 |
110 // Called when a permission bubble closes, and informs the presentation | 110 // Called when a permission bubble closes, and informs the presentation |
111 // controller that the dropdown can be hidden. (The dropdown should never be | 111 // controller that the dropdown can be hidden. (The dropdown should never be |
112 // hidden while a permissions bubble is visible.) | 112 // hidden while a permissions bubble is visible.) |
113 - (void)permissionBubbleWindowWillClose:(NSNotification*)notification; | 113 - (void)permissionBubbleWindowWillClose:(NSNotification*)notification; |
114 | 114 |
115 // Sets presentation mode, creating the PresentationModeController if needed and | |
116 // forcing a relayout. If |forceDropdown| is YES, this method will always | |
117 // initially show the floating bar when entering presentation mode, even if the | |
118 // floating bar does not have focus. This method is safe to call on all OS | |
119 // versions. | |
120 - (void)setPresentationModeInternal:(BOOL)presentationMode | |
121 forceDropdown:(BOOL)forceDropdown; | |
122 | |
123 // Enter or exit fullscreen without using Cocoa's System Fullscreen API. These | 115 // Enter or exit fullscreen without using Cocoa's System Fullscreen API. These |
124 // methods are internal implementations of |-setFullscreen:|. | 116 // methods are internal implementations of |-setFullscreen:|. |
125 - (void)enterImmersiveFullscreen; | 117 - (void)enterImmersiveFullscreen; |
126 - (void)exitImmersiveFullscreen; | 118 - (void)exitImmersiveFullscreen; |
127 | 119 |
128 // Register or deregister for content view resize notifications. These | 120 // Register or deregister for content view resize notifications. These |
129 // notifications are used while transitioning into fullscreen mode using Cocoa's | 121 // notifications are used while transitioning into fullscreen mode using Cocoa's |
130 // System Fullscreen API. | 122 // System Fullscreen API. |
131 - (void)registerForContentViewResizeNotifications; | 123 - (void)registerForContentViewResizeNotifications; |
132 - (void)deregisterForContentViewResizeNotifications; | 124 - (void)deregisterForContentViewResizeNotifications; |
133 | 125 |
134 // Adjust the UI when entering or leaving presentation mode. This method is | |
135 // safe to call on all OS versions. | |
136 - (void)adjustUIForPresentationMode:(BOOL)fullscreen; | |
137 | |
138 // Allows/prevents bar visibility locks and releases from updating the visual | 126 // Allows/prevents bar visibility locks and releases from updating the visual |
139 // state. Enabling makes changes instantaneously; disabling cancels any | 127 // state. Enabling makes changes instantaneously; disabling cancels any |
140 // timers/animation. | 128 // timers/animation. |
141 - (void)enableBarVisibilityUpdates; | 129 - (void)enableBarVisibilityUpdates; |
142 - (void)disableBarVisibilityUpdates; | 130 - (void)disableBarVisibilityUpdates; |
143 | 131 |
144 // If there are no visibility locks and bar visibity updates are enabled, hides | 132 // If there are no visibility locks and bar visibity updates are enabled, hides |
145 // the bar with |animation| and |delay|. Otherwise, does nothing. | 133 // the bar with |animation| and |delay|. Otherwise, does nothing. |
146 - (void)hideOverlayIfPossibleWithAnimation:(BOOL)animation delay:(BOOL)delay; | 134 - (void)hideOverlayIfPossibleWithAnimation:(BOOL)animation delay:(BOOL)delay; |
147 | 135 |
148 // The opacity for the toolbar divider; 0 means that it shouldn't be shown. | 136 // The opacity for the toolbar divider; 0 means that it shouldn't be shown. |
149 - (CGFloat)toolbarDividerOpacity; | 137 - (CGFloat)toolbarDividerOpacity; |
150 | 138 |
151 // Ensures the z-order of subviews is correct. | 139 // Ensures the z-order of subviews is correct. |
152 - (void)updateSubviewZOrder:(BOOL)inPresentationMode; | 140 - (void)updateSubviewZOrder:(BOOL)inPresentationMode; |
153 | 141 |
154 // Update visibility of the infobar tip, depending on the state of the window. | 142 // Update visibility of the infobar tip, depending on the state of the window. |
155 - (void)updateInfoBarTipVisibility; | 143 - (void)updateInfoBarTipVisibility; |
156 | 144 |
157 // Returns the max top arrow height for infobar. | 145 // Returns the max top arrow height for infobar. |
158 - (NSInteger)infoBarMaxTopArrowHeight; | 146 - (NSInteger)infoBarMaxTopArrowHeight; |
159 | 147 |
| 148 // Configures the presentationModeController_ right after it is constructed. |
| 149 - (void)configurePresentationModeController; |
| 150 |
| 151 // Allows the omnibox to slide. Also prepares UI for several fullscreen modes. |
| 152 // This method gets called when entering AppKit fullscren, or when entering |
| 153 // Immersive fullscreen. Expects fullscreenStyle_ to be set. |
| 154 - (void)adjustUIForSlidingFullscreenStyle:(fullscreen_mac::SlidingStyle)style; |
| 155 |
| 156 // This method gets called when exiting AppKit fullscreen, or when exiting |
| 157 // Immersive fullscreen. It performs some common UI changes, and stops the |
| 158 // omnibox from sliding. |
| 159 - (void)adjustUIForExitingFullscreenAndStopOmniboxSliding; |
| 160 |
| 161 // Toggles the AppKit Fullscreen API. By default, doing so enters Canonical |
| 162 // Fullscreen. |
| 163 - (void)enterAppKitFullscreen; |
| 164 - (void)exitAppKitFullscreen; |
| 165 |
160 @end // @interface BrowserWindowController(Private) | 166 @end // @interface BrowserWindowController(Private) |
161 | 167 |
162 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_PRIVATE_H_ | 168 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_PRIVATE_H_ |
OLD | NEW |