Chromium Code Reviews| 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..9616641f0431e0b6a4c3d2708d20b55be6eee942 |
| --- /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_ |
| + |
| +#include <Carbon/Carbon.h> |
|
Robert Sesek
2016/10/19 18:49:21
Carbon unused in the header. Move into the impl.
spqchan
2016/10/19 19:28:42
Done.
|
| +#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. |
| +- (id)initWithFullscreenToolbarController:(FullscreenToolbarController*)owner; |
|
Robert Sesek
2016/10/19 18:49:21
instancetype in new code
spqchan
2016/10/19 19:28:42
Done.
|
| + |
| +// 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_ |