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

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

Issue 2467833003: [Mac] Move the fullscreen toolbar style to FullscreenToolbarController (Closed)
Patch Set: Updated comments and fixed tests Created 4 years, 1 month 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 eab78f4cf4a12a9a86cf2579df96f722da56ec14..9e716ac98bfe20b1bc4b2aff13383b844fb16770 100644
--- a/chrome/browser/ui/cocoa/fullscreen_toolbar_controller.h
+++ b/chrome/browser/ui/cocoa/fullscreen_toolbar_controller.h
@@ -17,11 +17,18 @@ class FullscreenToolbarAnimationController;
@class FullscreenToolbarMouseTracker;
@class FullscreenToolbarVisibilityLockController;
-enum class FullscreenSlidingStyle {
- OMNIBOX_TABS_PRESENT, // Tab strip and omnibox both visible.
- OMNIBOX_TABS_HIDDEN, // Tab strip and omnibox both hidden.
- OMNIBOX_TABS_NONE, // Tab strip and omnibox both hidden and never
- // shown.
+// This enum class represents the appearance of the fullscreen toolbar, which
+// includes the tab strip and omnibox. There are 3 different styles:
+// + TOOLBAR_PRESENT: The toolbar is present. Moving the cursor to the top
+// causes the menubar to appear and the toolbar to slide down.
+// + TOOLBAR_HIDDEN: The toolbar is hidden. Moving cursor to top shows the
+// toolbar and menubar.
+// + TOOLBAR_NONE: Toolbar is hidden. Moving cursor to top causes the menubar
+// to appear, but not the toolbar.
+enum class FullscreenToolbarStyle {
+ TOOLBAR_PRESENT,
+ TOOLBAR_HIDDEN,
+ TOOLBAR_NONE,
};
// Provides a controller to fullscreen toolbar for a single browser
@@ -44,8 +51,7 @@ enum class FullscreenSlidingStyle {
// object is only set when the browser is in fullscreen mode.
base::scoped_nsobject<FullscreenMenubarTracker> menubarTracker_;
- // Maintains the toolbar's visibility locks for the
- // OMNIBOX_TABS_HIDDEN style.
+ // Maintains the toolbar's visibility locks for the TOOLBAR_HIDDEN style.
base::scoped_nsobject<FullscreenToolbarVisibilityLockController>
visibilityLockController_;
@@ -66,16 +72,12 @@ enum class FullscreenSlidingStyle {
// Used to track the current state and make sure we properly restore the menu
// bar when this controller is destroyed.
base::mac::FullScreenMode systemFullscreenMode_;
-
- // Whether the omnibox is hidden in fullscreen.
- FullscreenSlidingStyle slidingStyle_;
}
-@property(nonatomic, assign) FullscreenSlidingStyle slidingStyle;
+@property(nonatomic, assign) FullscreenToolbarStyle toolbarStyle;
// Designated initializer.
-- (id)initWithBrowserController:(BrowserWindowController*)controller
- style:(FullscreenSlidingStyle)style;
+- (id)initWithBrowserController:(BrowserWindowController*)controller;
// Informs the controller that the browser has entered or exited fullscreen
// mode. |-setupFullscreenToolbarForContentView:showDropdown:| should be called
@@ -122,6 +124,10 @@ enum class FullscreenSlidingStyle {
// Returns YES if the browser in in fullscreen.
- (BOOL)isInFullscreen;
+// Updates the toolbar style. If the style has changed, then the toolbar will
+// relayout.
+- (void)updateToolbarStyle;
+
// Updates the toolbar by updating the layout, menubar and dock.
- (void)updateToolbar;

Powered by Google App Engine
This is Rietveld 408576698