Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Unified Diff: chrome/browser/ui/cocoa/fullscreen/fullscreen_menubar_tracker.h

Issue 2355413007: [Mac] Refactor the Fullscreen Toolbar (Closed)
Patch Set: Nits and grits Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..e5710496ec3a366c4616e6ee591dc48015d10be4
--- /dev/null
+++ b/chrome/browser/ui/cocoa/fullscreen/fullscreen_menubar_tracker.h
@@ -0,0 +1,41 @@
+// 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_
+
+#include <Carbon/Carbon.h>
+#import <Cocoa/Cocoa.h>
+
+@class BrowserWindowController;
+class FullscreenToolbarLayoutManager;
+
+// 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
+
+// Returns 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.
+- (id)initWithFullscreenToolbarLayoutManager:
+ (FullscreenToolbarLayoutManager*)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_

Powered by Google App Engine
This is Rietveld 408576698