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

Side by Side Diff: chrome/browser/ui/cocoa/presentation_mode_controller.h

Issue 2086273003: [Mac] Reveal Fullscreen Toolbar for Tab Strip Changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed test Created 4 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_COCOA_PRESENTATION_MODE_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_PRESENTATION_MODE_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_COCOA_PRESENTATION_MODE_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_COCOA_PRESENTATION_MODE_CONTROLLER_H_
7 7
8 #include <Carbon/Carbon.h> 8 #include <Carbon/Carbon.h>
9 #import <Cocoa/Cocoa.h> 9 #import <Cocoa/Cocoa.h>
10 10
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 // The fraction of the AppKit Menubar that is showing. Ranges from 0 to 1. 91 // The fraction of the AppKit Menubar that is showing. Ranges from 0 to 1.
92 // Only used in AppKit Fullscreen. 92 // Only used in AppKit Fullscreen.
93 CGFloat menubarFraction_; 93 CGFloat menubarFraction_;
94 94
95 // The fraction of the omnibox/tabstrip that is showing. Ranges from 0 to 1. 95 // The fraction of the omnibox/tabstrip that is showing. Ranges from 0 to 1.
96 // Used in both AppKit and Immersive Fullscreen. 96 // Used in both AppKit and Immersive Fullscreen.
97 CGFloat toolbarFraction_; 97 CGFloat toolbarFraction_;
98 98
99 // A Carbon event handler that tracks the revealed fraction of the menu bar. 99 // A Carbon event handler that tracks the revealed fraction of the menu bar.
100 EventHandlerRef menuBarTrackingHandler_; 100 EventHandlerRef menuBarTrackingHandler_;
101
102 // True when the toolbar is dropped to show tabstrip changes.
103 BOOL revealToolbarForTabStripChanges_;
101 } 104 }
102 105
103 @property(readonly, nonatomic) BOOL inPresentationMode; 106 @property(readonly, nonatomic) BOOL inPresentationMode;
104 @property(nonatomic, assign) fullscreen_mac::SlidingStyle slidingStyle; 107 @property(nonatomic, assign) fullscreen_mac::SlidingStyle slidingStyle;
105 @property(nonatomic, assign) CGFloat toolbarFraction; 108 @property(nonatomic, assign) CGFloat toolbarFraction;
106 109
107 // Designated initializer. 110 // Designated initializer.
108 - (id)initWithBrowserController:(BrowserWindowController*)controller 111 - (id)initWithBrowserController:(BrowserWindowController*)controller
109 style:(fullscreen_mac::SlidingStyle)style; 112 style:(fullscreen_mac::SlidingStyle)style;
110 113
(...skipping 19 matching lines...) Expand all
130 - (void)overlayFrameChanged:(NSRect)frame; 133 - (void)overlayFrameChanged:(NSRect)frame;
131 134
132 // Informs the controller that the overlay should be shown/hidden, possibly with 135 // Informs the controller that the overlay should be shown/hidden, possibly with
133 // animation, possibly after a delay (only applicable for the animated case). 136 // animation, possibly after a delay (only applicable for the animated case).
134 - (void)ensureOverlayShownWithAnimation:(BOOL)animate delay:(BOOL)delay; 137 - (void)ensureOverlayShownWithAnimation:(BOOL)animate delay:(BOOL)delay;
135 - (void)ensureOverlayHiddenWithAnimation:(BOOL)animate delay:(BOOL)delay; 138 - (void)ensureOverlayHiddenWithAnimation:(BOOL)animate delay:(BOOL)delay;
136 139
137 // Cancels any running animation and timers. 140 // Cancels any running animation and timers.
138 - (void)cancelAnimationAndTimers; 141 - (void)cancelAnimationAndTimers;
139 142
143 // Animates the toolbar dropping down to show changes to the tab strip.
144 - (void)revealToolbarForTabStripChanges;
145
140 // In any fullscreen mode, the y offset to use for the content at the top of 146 // In any fullscreen mode, the y offset to use for the content at the top of
141 // the screen (tab strip, omnibox, bookmark bar, etc). 147 // the screen (tab strip, omnibox, bookmark bar, etc).
142 // Ranges from 0 to -22. 148 // Ranges from 0 to -22.
143 - (CGFloat)menubarOffset; 149 - (CGFloat)menubarOffset;
144 150
145 // Returns true if the window is the main window. 151 // Returns true if the window is the main window.
146 - (BOOL)isMainWindow; 152 - (BOOL)isMainWindow;
147 153
148 @end 154 @end
149 155
150 // Private methods exposed for testing. 156 // Private methods exposed for testing.
151 @interface PresentationModeController (ExposedForTesting) 157 @interface PresentationModeController (ExposedForTesting)
152 // Adjusts the AppKit Fullscreen options of the application. 158 // Adjusts the AppKit Fullscreen options of the application.
153 - (void)setSystemFullscreenModeTo:(base::mac::FullScreenMode)mode; 159 - (void)setSystemFullscreenModeTo:(base::mac::FullScreenMode)mode;
154 160
155 // Callback for menu bar animations. 161 // Callback for menu bar animations.
156 - (void)setMenuBarRevealProgress:(CGFloat)progress; 162 - (void)setMenuBarRevealProgress:(CGFloat)progress;
157 163
158 // Updates the local state that reflects the fraction of the toolbar area that 164 // Updates the local state that reflects the fraction of the toolbar area that
159 // is showing. This function has the side effect of changing the AppKit 165 // is showing. This function has the side effect of changing the AppKit
160 // Fullscreen option for whether the menu bar is shown. 166 // Fullscreen option for whether the menu bar is shown.
161 - (void)changeToolbarFraction:(CGFloat)fraction; 167 - (void)changeToolbarFraction:(CGFloat)fraction;
162 @end 168 @end
163 169
164 // Notification posted when we're about to enter or leave fullscreen. 170 // Notification posted when we're about to enter or leave fullscreen.
165 extern NSString* const kWillEnterFullscreenNotification; 171 extern NSString* const kWillEnterFullscreenNotification;
166 extern NSString* const kWillLeaveFullscreenNotification; 172 extern NSString* const kWillLeaveFullscreenNotification;
167 173
168 #endif // CHROME_BROWSER_UI_COCOA_PRESENTATION_MODE_CONTROLLER_H_ 174 #endif // CHROME_BROWSER_UI_COCOA_PRESENTATION_MODE_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698