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

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: scoped_nsobject Created 4 years, 5 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 // Returns true if the browser is in the process of entering/exiting 154 // Returns true if the browser is in the process of entering/exiting
149 // fullscreen. 155 // fullscreen.
150 - (BOOL)isFullscreenTransitionInProgress; 156 - (BOOL)isFullscreenTransitionInProgress;
151 157
152 @end 158 @end
153 159
154 // Private methods exposed for testing. 160 // Private methods exposed for testing.
155 @interface PresentationModeController (ExposedForTesting) 161 @interface PresentationModeController (ExposedForTesting)
156 // Adjusts the AppKit Fullscreen options of the application. 162 // Adjusts the AppKit Fullscreen options of the application.
157 - (void)setSystemFullscreenModeTo:(base::mac::FullScreenMode)mode; 163 - (void)setSystemFullscreenModeTo:(base::mac::FullScreenMode)mode;
158 164
159 // Callback for menu bar animations. 165 // Callback for menu bar animations.
160 - (void)setMenuBarRevealProgress:(CGFloat)progress; 166 - (void)setMenuBarRevealProgress:(CGFloat)progress;
161 167
162 // Updates the local state that reflects the fraction of the toolbar area that 168 // Updates the local state that reflects the fraction of the toolbar area that
163 // is showing. This function has the side effect of changing the AppKit 169 // is showing. This function has the side effect of changing the AppKit
164 // Fullscreen option for whether the menu bar is shown. 170 // Fullscreen option for whether the menu bar is shown.
165 - (void)changeToolbarFraction:(CGFloat)fraction; 171 - (void)changeToolbarFraction:(CGFloat)fraction;
172
166 @end 173 @end
167 174
168 // Notification posted when we're about to enter or leave fullscreen. 175 // Notification posted when we're about to enter or leave fullscreen.
169 extern NSString* const kWillEnterFullscreenNotification; 176 extern NSString* const kWillEnterFullscreenNotification;
170 extern NSString* const kWillLeaveFullscreenNotification; 177 extern NSString* const kWillLeaveFullscreenNotification;
171 178
172 #endif // CHROME_BROWSER_UI_COCOA_PRESENTATION_MODE_CONTROLLER_H_ 179 #endif // CHROME_BROWSER_UI_COCOA_PRESENTATION_MODE_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698