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