Chromium Code Reviews| Index: chrome/browser/ui/cocoa/fullscreen_toolbar_controller.h |
| diff --git a/chrome/browser/ui/cocoa/fullscreen_toolbar_controller.h b/chrome/browser/ui/cocoa/fullscreen_toolbar_controller.h |
| index eab78f4cf4a12a9a86cf2579df96f722da56ec14..324cf336706103bd7b0dab5a3f9b4e42b44dcf12 100644 |
| --- a/chrome/browser/ui/cocoa/fullscreen_toolbar_controller.h |
| +++ b/chrome/browser/ui/cocoa/fullscreen_toolbar_controller.h |
| @@ -17,11 +17,18 @@ class FullscreenToolbarAnimationController; |
| @class FullscreenToolbarMouseTracker; |
| @class FullscreenToolbarVisibilityLockController; |
| -enum class FullscreenSlidingStyle { |
| - OMNIBOX_TABS_PRESENT, // Tab strip and omnibox both visible. |
| - OMNIBOX_TABS_HIDDEN, // Tab strip and omnibox both hidden. |
| - OMNIBOX_TABS_NONE, // Tab strip and omnibox both hidden and never |
| - // shown. |
| +// This enum class represents the appearance of the fullscreen toolbar, which |
| +// includes the tab strip and omnibox. There are 3 different styles: |
| +// + TOOLBAR_PRESENT: The toolbar is present. Moving the cursor to the top |
|
Robert Sesek
2016/11/04 16:31:57
You could move this documentation to be above each
spqchan
2016/11/04 18:56:32
Done.
|
| +// causes the menubar to appear and the toolbar to slide down. |
| +// + TOOLBAR_HIDDEN: The toolbar is hidden. Moving cursor to top shows the |
| +// toolbar and menubar. |
| +// + TOOLBAR_NONE: Toolbar is hidden. Moving cursor to top causes the menubar |
| +// to appear, but not the toolbar. |
| +enum class FullscreenToolbarStyle { |
| + TOOLBAR_PRESENT, |
| + TOOLBAR_HIDDEN, |
| + TOOLBAR_NONE, |
| }; |
| // Provides a controller to fullscreen toolbar for a single browser |
| @@ -44,12 +51,11 @@ enum class FullscreenSlidingStyle { |
| // object is only set when the browser is in fullscreen mode. |
| base::scoped_nsobject<FullscreenMenubarTracker> menubarTracker_; |
| - // Maintains the toolbar's visibility locks for the |
| - // OMNIBOX_TABS_HIDDEN style. |
| + // Maintains the toolbar's visibility locks for the TOOLBAR_HIDDEN style. |
| base::scoped_nsobject<FullscreenToolbarVisibilityLockController> |
| visibilityLockController_; |
| - // Manages the toolbar animations for the OMNIBOX_TABS_HIDDEN style. |
| + // Manages the toolbar animations for the TOOLBAR_HIDDEN style. |
| std::unique_ptr<FullscreenToolbarAnimationController> animationController_; |
| // Mouse tracker to track the user's interactions with the toolbar. This |
| @@ -66,24 +72,17 @@ enum class FullscreenSlidingStyle { |
| // Used to track the current state and make sure we properly restore the menu |
| // bar when this controller is destroyed. |
| base::mac::FullScreenMode systemFullscreenMode_; |
| - |
| - // Whether the omnibox is hidden in fullscreen. |
| - FullscreenSlidingStyle slidingStyle_; |
| } |
| -@property(nonatomic, assign) FullscreenSlidingStyle slidingStyle; |
| +@property(nonatomic, assign) FullscreenToolbarStyle toolbarStyle; |
| // Designated initializer. |
| -- (id)initWithBrowserController:(BrowserWindowController*)controller |
| - style:(FullscreenSlidingStyle)style; |
| +- (id)initWithBrowserController:(BrowserWindowController*)controller; |
| // Informs the controller that the browser has entered or exited fullscreen |
| -// mode. |-setupFullscreenToolbarForContentView:showDropdown:| should be called |
| -// after the window is setup, just before it is shown. |-exitFullscreenMode| |
| -// should be called before any views are moved back to the non-fullscreen |
| -// window. If |-setupFullscreenToolbarForContentView:showDropdown:| is called, |
| -// it must be balanced with a call to |-exitFullscreenMode| before the |
| -// controller is released. |
| +// mode. |enterFullscreenMode| should be called when the window is about to |
|
Robert Sesek
2016/11/04 16:31:57
nit: Need a dash before enterFullscreenMode (like
spqchan
2016/11/04 18:56:32
Done.
|
| +// enter fullscreen. |-exitFullscreenMode| should be called before any views |
| +// are moved back to the non-fullscreen window. |
| - (void)enterFullscreenMode; |
| - (void)exitFullscreenMode; |
| @@ -122,6 +121,10 @@ enum class FullscreenSlidingStyle { |
| // Returns YES if the browser in in fullscreen. |
| - (BOOL)isInFullscreen; |
| +// Updates the toolbar style. If the style has changed, then the toolbar will |
| +// relayout. |
| +- (void)updateToolbarStyle; |
| + |
| // Updates the toolbar by updating the layout, menubar and dock. |
| - (void)updateToolbar; |