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

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

Issue 2296903002: [Mac] Fullscreen Toolbar Edge Cases (Closed)
Patch Set: slight cleanup Created 4 years, 3 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_FULLSCREEN_TOOLBAR_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_FULLSCREEN_TOOLBAR_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_COCOA_FULLSCREEN_TOOLBAR_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_COCOA_FULLSCREEN_TOOLBAR_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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 EventHandlerRef menuBarTrackingHandler_; 85 EventHandlerRef menuBarTrackingHandler_;
86 86
87 // True when the toolbar is dropped to show tabstrip changes. 87 // True when the toolbar is dropped to show tabstrip changes.
88 BOOL isRevealingToolbarForTabStripChanges_; 88 BOOL isRevealingToolbarForTabStripChanges_;
89 89
90 // True when the toolbar should be animated back out via a DropdownAnimation. 90 // True when the toolbar should be animated back out via a DropdownAnimation.
91 // This is set and unset in hideTimer:. It's set to YES before it calls 91 // This is set and unset in hideTimer:. It's set to YES before it calls
92 // animateToolbarVisibility: and then set to NO after the animation has 92 // animateToolbarVisibility: and then set to NO after the animation has
93 // started. 93 // started.
94 BOOL shouldAnimateToolbarOut_; 94 BOOL shouldAnimateToolbarOut_;
95
96 BOOL isLockingBarVisibility_;
97 BOOL isReleasingBarVisibility_;
95 } 98 }
96 99
97 @property(nonatomic, assign) fullscreen_mac::SlidingStyle slidingStyle; 100 @property(nonatomic, assign) fullscreen_mac::SlidingStyle slidingStyle;
98 101
99 // Designated initializer. 102 // Designated initializer.
100 - (id)initWithBrowserController:(BrowserWindowController*)controller 103 - (id)initWithBrowserController:(BrowserWindowController*)controller
101 style:(fullscreen_mac::SlidingStyle)style; 104 style:(fullscreen_mac::SlidingStyle)style;
102 105
103 // Informs the controller that the browser has entered or exited fullscreen 106 // Informs the controller that the browser has entered or exited fullscreen
104 // mode. |-setupFullscreenToolbarForContentView:showDropdown:| should be called 107 // mode. |-setupFullscreenToolbarForContentView:showDropdown:| should be called
105 // after the window is setup, just before it is shown. |-exitFullscreenMode| 108 // after the window is setup, just before it is shown. |-exitFullscreenMode|
106 // should be called before any views are moved back to the non-fullscreen 109 // should be called before any views are moved back to the non-fullscreen
107 // window. If |-setupFullscreenToolbarForContentView:showDropdown:| is called, 110 // window. If |-setupFullscreenToolbarForContentView:showDropdown:| is called,
108 // it must be balanced with a call to |-exitFullscreenMode| before the 111 // it must be balanced with a call to |-exitFullscreenMode| before the
109 // controller is released. 112 // controller is released.
110 - (void)setupFullscreenToolbarForContentView:(NSView*)contentView; 113 - (void)setupFullscreenToolbarForContentView:(NSView*)contentView;
111 - (void)exitFullscreenMode; 114 - (void)exitFullscreenMode;
112 115
113 // Returns the amount by which the floating bar should be offset downwards (to 116 // Returns the amount by which the floating bar should be offset downwards (to
114 // avoid the menu) and by which the overlay view should be enlarged vertically. 117 // avoid the menu) and by which the overlay view should be enlarged vertically.
115 // Generally, this is > 0 when the window is on the primary screen and 0 118 // Generally, this is > 0 when the window is on the primary screen and 0
116 // otherwise. 119 // otherwise.
117 - (CGFloat)floatingBarVerticalOffset; 120 - (CGFloat)floatingBarVerticalOffset;
118 121
122 - (void)lockBarVisibilityWithAnimation:(BOOL)animate;
123 - (void)releaseBarVisibilityWithAnimation:(BOOL)animate;
124
119 // Informs the controller that the overlay should be shown/hidden, possibly 125 // Informs the controller that the overlay should be shown/hidden, possibly
120 // with animation. 126 // with animation.
121 - (void)ensureOverlayShownWithAnimation:(BOOL)animate; 127 - (void)ensureOverlayShownWithAnimation:(BOOL)animate;
122 - (void)ensureOverlayHiddenWithAnimation:(BOOL)animate; 128 - (void)ensureOverlayHiddenWithAnimation:(BOOL)animate;
123 129
124 // Cancels any running animation and timers. 130 // Cancels any running animation and timers.
125 - (void)cancelAnimationAndTimer; 131 - (void)cancelAnimationAndTimer;
126 132
127 // Animates the toolbar dropping down to show changes to the tab strip. 133 // Animates the toolbar dropping down to show changes to the tab strip.
128 - (void)revealToolbarForTabStripChanges; 134 - (void)revealToolbarForTabStripChanges;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 @interface FullscreenToolbarController (ExposedForTesting) 168 @interface FullscreenToolbarController (ExposedForTesting)
163 // Adjusts the AppKit Fullscreen options of the application. 169 // Adjusts the AppKit Fullscreen options of the application.
164 - (void)setSystemFullscreenModeTo:(base::mac::FullScreenMode)mode; 170 - (void)setSystemFullscreenModeTo:(base::mac::FullScreenMode)mode;
165 171
166 // Callback for menu bar animations. 172 // Callback for menu bar animations.
167 - (void)setMenuBarRevealProgress:(CGFloat)progress; 173 - (void)setMenuBarRevealProgress:(CGFloat)progress;
168 174
169 @end 175 @end
170 176
171 #endif // CHROME_BROWSER_UI_COCOA_FULLSCREEN_TOOLBAR_CONTROLLER_H_ 177 #endif // CHROME_BROWSER_UI_COCOA_FULLSCREEN_TOOLBAR_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698