Index: chrome/browser/ui/cocoa/fullscreen/fullscreen_menubar_tracker.h |
diff --git a/chrome/browser/ui/cocoa/fullscreen/fullscreen_menubar_tracker.h b/chrome/browser/ui/cocoa/fullscreen/fullscreen_menubar_tracker.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..e3292a8b509fcf4ee695d95bf613e1526c2aa85b |
--- /dev/null |
+++ b/chrome/browser/ui/cocoa/fullscreen/fullscreen_menubar_tracker.h |
@@ -0,0 +1,40 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_UI_COCOA_FULLSCREEN_FULLSCREEN_MENUBAR_TRACKER_H_ |
+#define CHROME_BROWSER_UI_COCOA_FULLSCREEN_FULLSCREEN_MENUBAR_TRACKER_H_ |
+ |
+#import <Cocoa/Cocoa.h> |
+ |
+@class BrowserWindowController; |
+@class FullscreenToolbarController; |
+ |
+// State of the menubar in the window's screen. |
+enum class FullscreenMenubarState { |
+ SHOWN, // Menubar is fully shown. |
+ HIDDEN, // Menubar is fully hidden. |
+ SHOWING, // Menubar is animating in. |
+ HIDING, // Menubar is animating out. |
+}; |
+ |
+@interface FullscreenMenubarTracker : NSObject |
+ |
+// The state of the menubar. |
+@property(nonatomic, readonly) FullscreenMenubarState state; |
+ |
+// The fraction of the menubar shown on the screen. |
+@property(nonatomic, readonly) CGFloat menubarFraction; |
+ |
+// Designated initializer. |
+- (instancetype)initWithFullscreenToolbarController: |
+ (FullscreenToolbarController*)owner; |
+ |
+// Called by MenuBarRevealHandler to update the menubar progress. The progress |
+// is only updated if the window is in fullscreen and the mouse is in the |
+// same screen. |
+- (void)setMenubarProgress:(CGFloat)progress; |
+ |
+@end |
+ |
+#endif // CHROME_BROWSER_UI_COCOA_FULLSCREEN_FULLSCREEN_MENUBAR_TRACKER_H_ |