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

Unified Diff: chrome/browser/ui/cocoa/fullscreen_toolbar_controller.h

Issue 2430863002: [Mac] Refactor the fullscreen menubar (Closed)
Patch Set: Fix for rsesek 2 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_toolbar_controller.h
diff --git a/chrome/browser/ui/cocoa/fullscreen_toolbar_controller.h b/chrome/browser/ui/cocoa/fullscreen_toolbar_controller.h
index 4707470c5a8c285c01379cffd9ea1896dcdd6abf..c34cdaf7314ec9632914af18058c7900ed5739ed 100644
--- a/chrome/browser/ui/cocoa/fullscreen_toolbar_controller.h
+++ b/chrome/browser/ui/cocoa/fullscreen_toolbar_controller.h
@@ -14,6 +14,7 @@
@class BrowserWindowController;
@class CrTrackingArea;
@class DropdownAnimation;
+@class FullscreenMenubarTracker;
enum class FullscreenSlidingStyle {
OMNIBOX_TABS_PRESENT, // Tab strip and omnibox both visible.
@@ -22,14 +23,6 @@ enum class FullscreenSlidingStyle {
// shown.
};
-// 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.
-};
-
// Provides a controller to fullscreen toolbar for a single browser
// window. This class handles running animations, showing and hiding the
// fullscreen toolbar, and managing the tracking area associated with the
@@ -58,6 +51,10 @@ enum class FullscreenMenubarState {
// but the mouse is still on the toolbar.
base::scoped_nsobject<CrTrackingArea> trackingArea_;
+ // Updates the fullscreen toolbar layout for changes in the menubar. This
+ // object is only set when the browser is in fullscreen mode.
+ base::scoped_nsobject<FullscreenMenubarTracker> menubarTracker_;
+
// Pointer to the currently running animation. Is nil if no animation is
// running.
base::scoped_nsobject<DropdownAnimation> currentAnimation_;
@@ -80,16 +77,6 @@ enum class FullscreenMenubarState {
// Whether the omnibox is hidden in fullscreen.
FullscreenSlidingStyle slidingStyle_;
- // The fraction of the AppKit Menubar that is showing. Ranges from 0 to 1.
- // Only used in AppKit Fullscreen.
- CGFloat menubarFraction_;
-
- // The state of the menubar in fullscreen.
- FullscreenMenubarState menubarState_;
-
- // A Carbon event handler that tracks the revealed fraction of the menu bar.
- EventHandlerRef menuBarTrackingHandler_;
-
// True when the toolbar is dropped to show tabstrip changes.
BOOL isRevealingToolbarForTabStripChanges_;
@@ -121,12 +108,6 @@ enum class FullscreenMenubarState {
- (void)setupFullscreenToolbarForContentView:(NSView*)contentView;
- (void)exitFullscreenMode;
-// Returns the amount by which the floating bar should be offset downwards (to
-// avoid the menu) and by which the overlay view should be enlarged vertically.
-// Generally, this is > 0 when the window is on the primary screen and 0
-// otherwise.
-- (CGFloat)floatingBarVerticalOffset;
-
// Shows/hides the toolbar with animation to reflect changes for the toolbar
// visibility locks. lockBarVisibilityWithAnimation: should only be called when
// the lock state goes from unlocked to locked. Likewise,
@@ -175,6 +156,9 @@ enum class FullscreenMenubarState {
// Updates the toolbar by updating the layout, menubar and dock.
- (void)updateToolbar;
+// Returns |browserController_|.
+- (BrowserWindowController*)browserWindowController;
+
@end
// Private methods exposed for testing.

Powered by Google App Engine
This is Rietveld 408576698