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 3 // found in the LICENSE file. 4 5 #ifndef CHROME_BROWSER_UI_COCOA_FULLSCREEN_FULLSCREEN_MENUBAR_TRACKER_H_ 6 #define CHROME_BROWSER_UI_COCOA_FULLSCREEN_FULLSCREEN_MENUBAR_TRACKER_H_ 7 8 #import <Cocoa/Cocoa.h> 9 10 @class BrowserWindowController; 11 @class FullscreenToolbarController; 12 13 // State of the menubar in the window's screen. 14 enum class FullscreenMenubarState { 15 SHOWN, // Menubar is fully shown. 16 HIDDEN, // Menubar is fully hidden. 17 SHOWING, // Menubar is animating in. 18 HIDING, // Menubar is animating out. 19 }; 20 21 @interface FullscreenMenubarTracker : NSObject 22 23 // The state of the menubar. 24 @property(nonatomic, readonly) FullscreenMenubarState state; 25 26 // The fraction of the menubar shown on the screen. 27 @property(nonatomic, readonly) CGFloat menubarFraction; 28 29 // Designated initializer. 30 - (instancetype)initWithFullscreenToolbarController: 31 (FullscreenToolbarController*)owner; 32 33 // Called by MenuBarRevealHandler to update the menubar progress. The progress 34 // is only updated if the window is in fullscreen and the mouse is in the 35 // same screen. 36 - (void)setMenubarProgress:(CGFloat)progress; 37 38 @end 39 40 #endif // CHROME_BROWSER_UI_COCOA_FULLSCREEN_FULLSCREEN_MENUBAR_TRACKER_H_