| 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_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_ |
| 7 | 7 |
| 8 // A class acting as the Objective-C controller for the Browser | 8 // A class acting as the Objective-C controller for the Browser |
| 9 // object. Handles interactions between Cocoa and the cross-platform | 9 // object. Handles interactions between Cocoa and the cross-platform |
| 10 // code. Each window has a single toolbar and, by virtue of being a | 10 // code. Each window has a single toolbar and, by virtue of being a |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 class BrowserWindow; | 36 class BrowserWindow; |
| 37 class BrowserWindowCocoa; | 37 class BrowserWindowCocoa; |
| 38 @class BrowserWindowFullscreenTransition; | 38 @class BrowserWindowFullscreenTransition; |
| 39 @class DevToolsController; | 39 @class DevToolsController; |
| 40 @class DownloadShelfController; | 40 @class DownloadShelfController; |
| 41 class ExtensionKeybindingRegistryCocoa; | 41 class ExtensionKeybindingRegistryCocoa; |
| 42 class ExclusiveAccessController; | 42 class ExclusiveAccessController; |
| 43 class ExclusiveAccessContext; | 43 class ExclusiveAccessContext; |
| 44 @class FindBarCocoaController; | 44 @class FindBarCocoaController; |
| 45 @class FullscreenModeController; | 45 @class FullscreenModeController; |
| 46 @class FullscreenToolbarController; |
| 47 @class FullscreenToolbarVisibilityLockController; |
| 46 @class FullscreenWindow; | 48 @class FullscreenWindow; |
| 47 class FullscreenLowPowerCoordinatorCocoa; | 49 class FullscreenLowPowerCoordinatorCocoa; |
| 48 @class InfoBarContainerController; | 50 @class InfoBarContainerController; |
| 49 class LocationBarViewMac; | 51 class LocationBarViewMac; |
| 50 @class OverlayableContentsController; | 52 @class OverlayableContentsController; |
| 51 class PermissionBubbleCocoa; | 53 class PermissionBubbleCocoa; |
| 52 @class FullscreenToolbarController; | |
| 53 class StatusBubbleMac; | 54 class StatusBubbleMac; |
| 54 @class TabStripController; | 55 @class TabStripController; |
| 55 @class TabStripView; | 56 @class TabStripView; |
| 56 @class ToolbarController; | 57 @class ToolbarController; |
| 57 @class TranslateBubbleController; | 58 @class TranslateBubbleController; |
| 58 | 59 |
| 59 namespace content { | 60 namespace content { |
| 60 class WebContents; | 61 class WebContents; |
| 61 } | 62 } |
| 62 | 63 |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 BOOL appKitDidExitFullscreen_; | 175 BOOL appKitDidExitFullscreen_; |
| 175 | 176 |
| 176 // The size of the original (non-fullscreen) window. This is saved just | 177 // The size of the original (non-fullscreen) window. This is saved just |
| 177 // before entering fullscreen mode and is only valid when |-isFullscreen| | 178 // before entering fullscreen mode and is only valid when |-isFullscreen| |
| 178 // returns YES. | 179 // returns YES. |
| 179 NSRect savedRegularWindowFrame_; | 180 NSRect savedRegularWindowFrame_; |
| 180 | 181 |
| 181 // The proportion of the floating bar which is shown. | 182 // The proportion of the floating bar which is shown. |
| 182 CGFloat floatingBarShownFraction_; | 183 CGFloat floatingBarShownFraction_; |
| 183 | 184 |
| 184 // Various UI elements/events may want to ensure that the floating bar is | |
| 185 // visible (in presentation mode), e.g., because of where the mouse is or | |
| 186 // where keyboard focus is. Whenever an object requires bar visibility, it has | |
| 187 // itself added to |barVisibilityLocks_|. When it no longer requires bar | |
| 188 // visibility, it has itself removed. | |
| 189 base::scoped_nsobject<NSMutableSet> barVisibilityLocks_; | |
| 190 | |
| 191 // Bar visibility locks and releases only result (when appropriate) in changes | |
| 192 // in visible state when the following is |YES|. | |
| 193 BOOL barVisibilityUpdatesEnabled_; | |
| 194 | |
| 195 // If this ivar is set to YES, layoutSubviews calls will be ignored. This is | 185 // If this ivar is set to YES, layoutSubviews calls will be ignored. This is |
| 196 // used in fullscreen transition to prevent spurious resize messages from | 186 // used in fullscreen transition to prevent spurious resize messages from |
| 197 // being sent to the renderer, which causes the transition to be janky. | 187 // being sent to the renderer, which causes the transition to be janky. |
| 198 BOOL blockLayoutSubviews_; | 188 BOOL blockLayoutSubviews_; |
| 199 | 189 |
| 200 // The Extension Command Registry used to determine which keyboard events to | 190 // The Extension Command Registry used to determine which keyboard events to |
| 201 // handle. | 191 // handle. |
| 202 std::unique_ptr<ExtensionKeybindingRegistryCocoa> | 192 std::unique_ptr<ExtensionKeybindingRegistryCocoa> |
| 203 extensionKeybindingRegistry_; | 193 extensionKeybindingRegistry_; |
| 204 } | 194 } |
| (...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 560 - (void)resizeFullscreenWindow; | 550 - (void)resizeFullscreenWindow; |
| 561 | 551 |
| 562 // Query/lock/release the requirement that the tab strip/toolbar/attached | 552 // Query/lock/release the requirement that the tab strip/toolbar/attached |
| 563 // bookmark bar bar cluster is visible (e.g., when one of its elements has | 553 // bookmark bar bar cluster is visible (e.g., when one of its elements has |
| 564 // focus). This is required for the floating bar if it's hidden in fullscreen, | 554 // focus). This is required for the floating bar if it's hidden in fullscreen, |
| 565 // but should also be called when not in fullscreen mode; see the comments for | 555 // but should also be called when not in fullscreen mode; see the comments for |
| 566 // |barVisibilityLocks_| for more details. Double locks/releases by the same | 556 // |barVisibilityLocks_| for more details. Double locks/releases by the same |
| 567 // owner are ignored. If |animate:| is YES, then an animation may be | 557 // owner are ignored. If |animate:| is YES, then an animation may be |
| 568 // performed. In the case of multiple calls, later calls have precedence with | 558 // performed. In the case of multiple calls, later calls have precedence with |
| 569 // the rule that |animate:NO| has precedence over |animate:YES|. If |owner| is | 559 // the rule that |animate:NO| has precedence over |animate:YES|. If |owner| is |
| 570 // nil in isBarVisibilityLockedForOwner, the method returns YES if there are | 560 // nil in isToolbarVisibilityLockedForOwner, the method returns YES if there are |
| 571 // any locks. | 561 // any locks. |
| 572 - (BOOL)isBarVisibilityLockedForOwner:(id)owner; | 562 - (BOOL)isToolbarVisibilityLockedForOwner:(id)owner; |
| 573 - (void)lockBarVisibilityForOwner:(id)owner withAnimation:(BOOL)animate; | 563 - (void)lockToolbarVisibilityForOwner:(id)owner withAnimation:(BOOL)animate; |
| 574 - (void)releaseBarVisibilityForOwner:(id)owner withAnimation:(BOOL)animate; | 564 - (void)releaseToolbarVisibilityForOwner:(id)owner withAnimation:(BOOL)animate; |
| 575 | 565 |
| 576 // Returns YES if any of the views in the floating bar currently has focus. | 566 // Returns YES if any of the views in the floating bar currently has focus. |
| 577 - (BOOL)floatingBarHasFocus; | 567 - (BOOL)floatingBarHasFocus; |
| 578 | 568 |
| 579 // Accessor for the controller managing fullscreen ExclusiveAccessContext. | 569 // Accessor for the controller managing fullscreen ExclusiveAccessContext. |
| 580 - (ExclusiveAccessController*)exclusiveAccessController; | 570 - (ExclusiveAccessController*)exclusiveAccessController; |
| 581 | 571 |
| 582 @end // @interface BrowserWindowController(Fullscreen) | 572 @end // @interface BrowserWindowController(Fullscreen) |
| 583 | 573 |
| 584 | 574 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 628 // Returns the fullscreen toolbar controller. | 618 // Returns the fullscreen toolbar controller. |
| 629 - (FullscreenToolbarController*)fullscreenToolbarController; | 619 - (FullscreenToolbarController*)fullscreenToolbarController; |
| 630 | 620 |
| 631 // Sets the fullscreen toolbar controller. | 621 // Sets the fullscreen toolbar controller. |
| 632 - (void)setFullscreenToolbarController:(FullscreenToolbarController*)controller; | 622 - (void)setFullscreenToolbarController:(FullscreenToolbarController*)controller; |
| 633 | 623 |
| 634 @end // @interface BrowserWindowController (TestingAPI) | 624 @end // @interface BrowserWindowController (TestingAPI) |
| 635 | 625 |
| 636 | 626 |
| 637 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_ | 627 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_ |
| OLD | NEW |