| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_FULLSCREEN_FULLSCREEN_TOOLBAR_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_FULLSCREEN_FULLSCREEN_TOOLBAR_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_UI_COCOA_FULLSCREEN_FULLSCREEN_TOOLBAR_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_COCOA_FULLSCREEN_FULLSCREEN_TOOLBAR_CONTROLLER_H_ |
| 7 | 7 |
| 8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
| 9 | 9 |
| 10 #include "base/mac/mac_util.h" | 10 #include "base/mac/mac_util.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 | 41 |
| 42 // The amount the menuber should be offset from the top of the screen. | 42 // The amount the menuber should be offset from the top of the screen. |
| 43 CGFloat menubarOffset; | 43 CGFloat menubarOffset; |
| 44 }; | 44 }; |
| 45 | 45 |
| 46 // Provides a controller to the fullscreen toolbar for a single browser | 46 // Provides a controller to the fullscreen toolbar for a single browser |
| 47 // window. This class sets up the animation manager, visibility locks, menubar | 47 // window. This class sets up the animation manager, visibility locks, menubar |
| 48 // tracking, and mouse tracking associated with the toolbar. It receives input | 48 // tracking, and mouse tracking associated with the toolbar. It receives input |
| 49 // from these objects to update and recompute the fullscreen toolbar laytout. | 49 // from these objects to update and recompute the fullscreen toolbar laytout. |
| 50 | 50 |
| 51 // TODO (spqchan): Write tests for this class. See crbug.com/640064. | |
| 52 @interface FullscreenToolbarController : NSObject { | 51 @interface FullscreenToolbarController : NSObject { |
| 53 @private | 52 @private |
| 54 // Our parent controller. | 53 // Our parent controller. |
| 55 BrowserWindowController* browserController_; // weak | 54 BrowserWindowController* browserController_; // weak |
| 56 | 55 |
| 57 // Whether or not we are in fullscreen mode. | 56 // Whether or not we are in fullscreen mode. |
| 58 BOOL inFullscreenMode_; | 57 BOOL inFullscreenMode_; |
| 59 | 58 |
| 60 // Updates the fullscreen toolbar layout for changes in the menubar. This | 59 // Updates the fullscreen toolbar layout for changes in the menubar. This |
| 61 // object is only set when the browser is in fullscreen mode. | 60 // object is only set when the browser is in fullscreen mode. |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 // Returns |browserController_|. | 123 // Returns |browserController_|. |
| 125 - (BrowserWindowController*)browserWindowController; | 124 - (BrowserWindowController*)browserWindowController; |
| 126 | 125 |
| 127 // Returns the object in |visibilityLockController_|; | 126 // Returns the object in |visibilityLockController_|; |
| 128 - (FullscreenToolbarVisibilityLockController*)visibilityLockController; | 127 - (FullscreenToolbarVisibilityLockController*)visibilityLockController; |
| 129 | 128 |
| 130 @end | 129 @end |
| 131 | 130 |
| 132 // Private methods exposed for testing. | 131 // Private methods exposed for testing. |
| 133 @interface FullscreenToolbarController (ExposedForTesting) | 132 @interface FullscreenToolbarController (ExposedForTesting) |
| 134 // Adjusts the AppKit Fullscreen options of the application. | |
| 135 - (void)setSystemFullscreenModeTo:(base::mac::FullScreenMode)mode; | |
| 136 | 133 |
| 137 // Callback for menu bar animations. | 134 // Returns |animationController_|. |
| 138 - (void)setMenuBarRevealProgress:(CGFloat)progress; | 135 - (FullscreenToolbarAnimationController*)animationController; |
| 136 |
| 137 // Allows tests to set a mock FullscreenMenubarTracker object. |
| 138 - (void)setMenubarTracker:(FullscreenMenubarTracker*)tracker; |
| 139 |
| 140 // Allows tests to set a mock FullscreenToolbarMouseTracker object. |
| 141 - (void)setMouseTracker:(FullscreenToolbarMouseTracker*)tracker; |
| 142 |
| 143 // Sets the value of |toolbarStyle_|. |
| 144 - (void)setToolbarStyle:(FullscreenToolbarStyle)style; |
| 145 |
| 146 // Sets the value of |inFullscreenMode_|. |
| 147 - (void)setTestFullscreenMode:(BOOL)isInFullscreen; |
| 148 |
| 149 // Returns |kToolbarVerticalOffset|. |
| 150 - (CGFloat)toolbarVerticalOffset; |
| 139 | 151 |
| 140 @end | 152 @end |
| 141 | 153 |
| 142 #endif // CHROME_BROWSER_UI_COCOA_FULLSCREEN_FULLSCREEN_TOOLBAR_CONTROLLER_H_ | 154 #endif // CHROME_BROWSER_UI_COCOA_FULLSCREEN_FULLSCREEN_TOOLBAR_CONTROLLER_H_ |
| OLD | NEW |