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 667f65ecac082eab9b0dd7279c9cb341a0dee689..5ac9ec1e5440da23ef944c8892e556f7f6b8fae4 100644 |
| --- a/chrome/browser/ui/cocoa/fullscreen_toolbar_controller.h |
| +++ b/chrome/browser/ui/cocoa/fullscreen_toolbar_controller.h |
| @@ -22,6 +22,15 @@ enum SlidingStyle { |
| OMNIBOX_TABS_NONE, // Tab strip and omnibox both hidden and never |
| // shown. |
| }; |
| + |
| +// State of the menubar in the window's screen. |
| +enum MenubarState { |
|
Robert Sesek
2016/09/08 18:37:42
Follow-up cleanup idea: drop the namespace and mak
spqchan
2016/09/08 21:35:57
Done.
Robert Sesek
2016/09/08 22:40:02
I suggested making this an enum class, not just an
|
| + MENUBAR_SHOWN = 0, // Menubar is fully shown. |
| + MENUBAR_HIDDEN, // Menubar is fully hidden. |
| + MENUBAR_SHOWING, // Menubar is animating in. |
| + MENUBAR_HIDING, // Menubar is animating out. |
| +}; |
| + |
| } // namespace fullscreen_mac |
| // Provides a controller to fullscreen toolbar for a single browser |
| @@ -78,8 +87,8 @@ enum SlidingStyle { |
| // Only used in AppKit Fullscreen. |
| CGFloat menubarFraction_; |
| - // The toolbar fraction set by the menu progress. |
| - CGFloat toolbarFractionFromMenuProgress_; |
| + // The state of the menubar in fullscreen. |
| + fullscreen_mac::MenubarState menubarState_; |
| // A Carbon event handler that tracks the revealed fraction of the menu bar. |
| EventHandlerRef menuBarTrackingHandler_; |
| @@ -88,10 +97,15 @@ enum SlidingStyle { |
| BOOL isRevealingToolbarForTabStripChanges_; |
| // True when the toolbar should be animated back out via a DropdownAnimation. |
| - // This is set and unset in hideTimer:. It's set to YES before it calls |
| - // animateToolbarVisibility: and then set to NO after the animation has |
| - // started. |
| + // This is set and unset in hideTimer: and mouseExited:. It's set to YES |
| + // before it calls animateToolbarVisibility: and then set to NO after the |
| + // animation has started. |
| BOOL shouldAnimateToolbarOut_; |
| + |
| + // True when the toolbar is animating in/out for changes in the toolbar |
| + // visibility locks. |
| + BOOL isLockingBarVisibility_; |
| + BOOL isReleasingBarVisibility_; |
| } |
| @property(nonatomic, assign) fullscreen_mac::SlidingStyle slidingStyle; |
| @@ -116,6 +130,14 @@ enum SlidingStyle { |
| // otherwise. |
| - (CGFloat)floatingBarVerticalOffset; |
| +// Shows/hides the toolbar with animation to reflect changes for the toolbar |
| +// visibility locks. lockBarVisibilityWithAnimation: should only be called when |
| +// the lock state goes from unlocked to locked. Likewise, |
| +// releaseBarVisibilityWithAnimation: should only be called whenthe lock state |
| +// goes from locked to unlocked. |
| +- (void)lockBarVisibilityWithAnimation:(BOOL)animate; |
| +- (void)releaseBarVisibilityWithAnimation:(BOOL)animate; |
| + |
| // Informs the controller that the overlay should be shown/hidden, possibly |
| // with animation. |
| - (void)ensureOverlayShownWithAnimation:(BOOL)animate; |