| 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/presentation_mode_controller.h" |
| 9 | 10 |
| 10 // Private methods for the |BrowserWindowController|. This category should | 11 // Private methods for the |BrowserWindowController|. This category should |
| 11 // contain the private methods used by different parts of the BWC; private | 12 // contain the private methods used by different parts of the BWC; private |
| 12 // methods used only by single parts should be declared in their own file. | 13 // methods used only by single parts should be declared in their own file. |
| 13 // TODO(viettrungluu): [crbug.com/35543] work on splitting out stuff from the | 14 // TODO(viettrungluu): [crbug.com/35543] work on splitting out stuff from the |
| 14 // BWC, and figuring out which methods belong here (need to unravel | 15 // BWC, and figuring out which methods belong here (need to unravel |
| 15 // "dependencies"). | 16 // "dependencies"). |
| 16 @interface BrowserWindowController(Private) | 17 @interface BrowserWindowController(Private) |
| 17 | 18 |
| 18 // Create the appropriate tab strip controller based on whether or not side | 19 // Create the appropriate tab strip controller based on whether or not side |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 // does not position views; callers must also call |-layoutSubviews:|. | 106 // does not position views; callers must also call |-layoutSubviews:|. |
| 106 - (void)moveViewsForImmersiveFullscreen:(BOOL)fullscreen | 107 - (void)moveViewsForImmersiveFullscreen:(BOOL)fullscreen |
| 107 regularWindow:(NSWindow*)regularWindow | 108 regularWindow:(NSWindow*)regularWindow |
| 108 fullscreenWindow:(NSWindow*)fullscreenWindow; | 109 fullscreenWindow:(NSWindow*)fullscreenWindow; |
| 109 | 110 |
| 110 // Called when a permission bubble closes, and informs the presentation | 111 // Called when a permission bubble closes, and informs the presentation |
| 111 // controller that the dropdown can be hidden. (The dropdown should never be | 112 // controller that the dropdown can be hidden. (The dropdown should never be |
| 112 // hidden while a permissions bubble is visible.) | 113 // hidden while a permissions bubble is visible.) |
| 113 - (void)permissionBubbleWindowWillClose:(NSNotification*)notification; | 114 - (void)permissionBubbleWindowWillClose:(NSNotification*)notification; |
| 114 | 115 |
| 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 | 116 // Enter or exit fullscreen without using Cocoa's System Fullscreen API. These |
| 124 // methods are internal implementations of |-setFullscreen:|. | 117 // methods are internal implementations of |-setFullscreen:|. |
| 125 - (void)enterImmersiveFullscreen; | 118 - (void)enterImmersiveFullscreen; |
| 126 - (void)exitImmersiveFullscreen; | 119 - (void)exitImmersiveFullscreen; |
| 127 | 120 |
| 128 // Register or deregister for content view resize notifications. These | 121 // Register or deregister for content view resize notifications. These |
| 129 // notifications are used while transitioning into fullscreen mode using Cocoa's | 122 // notifications are used while transitioning into fullscreen mode using Cocoa's |
| 130 // System Fullscreen API. | 123 // System Fullscreen API. |
| 131 - (void)registerForContentViewResizeNotifications; | 124 - (void)registerForContentViewResizeNotifications; |
| 132 - (void)deregisterForContentViewResizeNotifications; | 125 - (void)deregisterForContentViewResizeNotifications; |
| 133 | 126 |
| 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 | 127 // Allows/prevents bar visibility locks and releases from updating the visual |
| 139 // state. Enabling makes changes instantaneously; disabling cancels any | 128 // state. Enabling makes changes instantaneously; disabling cancels any |
| 140 // timers/animation. | 129 // timers/animation. |
| 141 - (void)enableBarVisibilityUpdates; | 130 - (void)enableBarVisibilityUpdates; |
| 142 - (void)disableBarVisibilityUpdates; | 131 - (void)disableBarVisibilityUpdates; |
| 143 | 132 |
| 144 // If there are no visibility locks and bar visibity updates are enabled, hides | 133 // If there are no visibility locks and bar visibity updates are enabled, hides |
| 145 // the bar with |animation| and |delay|. Otherwise, does nothing. | 134 // the bar with |animation| and |delay|. Otherwise, does nothing. |
| 146 - (void)hideOverlayIfPossibleWithAnimation:(BOOL)animation delay:(BOOL)delay; | 135 - (void)hideOverlayIfPossibleWithAnimation:(BOOL)animation delay:(BOOL)delay; |
| 147 | 136 |
| 148 // The opacity for the toolbar divider; 0 means that it shouldn't be shown. | 137 // The opacity for the toolbar divider; 0 means that it shouldn't be shown. |
| 149 - (CGFloat)toolbarDividerOpacity; | 138 - (CGFloat)toolbarDividerOpacity; |
| 150 | 139 |
| 151 // Ensures the z-order of subviews is correct. | 140 // Ensures the z-order of subviews is correct. |
| 152 - (void)updateSubviewZOrder:(BOOL)inPresentationMode; | 141 - (void)updateSubviewZOrder:(BOOL)inPresentationMode; |
| 153 | 142 |
| 154 // Update visibility of the infobar tip, depending on the state of the window. | 143 // Update visibility of the infobar tip, depending on the state of the window. |
| 155 - (void)updateInfoBarTipVisibility; | 144 - (void)updateInfoBarTipVisibility; |
| 156 | 145 |
| 157 // Returns the max top arrow height for infobar. | 146 // Returns the max top arrow height for infobar. |
| 158 - (NSInteger)infoBarMaxTopArrowHeight; | 147 - (NSInteger)infoBarMaxTopArrowHeight; |
| 159 | 148 |
| 149 // Configures the presentationModeController_ right after it is constructed. |
| 150 - (void)configurePresentationModeController; |
| 151 |
| 152 // Allows the omnibox to slide. Also prepares UI for several fullscreen modes. |
| 153 // This method gets called when entering AppKit fullscren, or when entering |
| 154 // Immersive fullscreen. Expects fullscreenStyle_ to be set. |
| 155 - (void)adjustUIForSlidingFullscreenStyle:(fullscreen_mac::SlidingStyle)style; |
| 156 |
| 157 // This method gets called when exiting AppKit fullscreen, or when exiting |
| 158 // Immersive fullscreen. It performs some common UI changes, and stops the |
| 159 // omnibox from sliding. |
| 160 - (void)adjustUIForExitingFullscreenAndStopOmniboxSliding; |
| 161 |
| 162 // Toggles the AppKit Fullscreen API. By default, doing so enters Canonical |
| 163 // Fullscreen. |
| 164 - (void)enterAppKitFullscreen; |
| 165 - (void)exitAppKitFullscreen; |
| 166 |
| 160 @end // @interface BrowserWindowController(Private) | 167 @end // @interface BrowserWindowController(Private) |
| 161 | 168 |
| 162 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_PRIVATE_H_ | 169 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_PRIVATE_H_ |
| OLD | NEW |