| Index: chrome/browser/ui/cocoa/fullscreen_toolbar_controller.h
|
| diff --git a/chrome/browser/ui/cocoa/presentation_mode_controller.h b/chrome/browser/ui/cocoa/fullscreen_toolbar_controller.h
|
| similarity index 84%
|
| rename from chrome/browser/ui/cocoa/presentation_mode_controller.h
|
| rename to chrome/browser/ui/cocoa/fullscreen_toolbar_controller.h
|
| index 642df15240f36dd2f7e7ff6caa7de2ff7c83e0d7..e268e914a2f2d45bd77b61755b8fc62db38c04b3 100644
|
| --- a/chrome/browser/ui/cocoa/presentation_mode_controller.h
|
| +++ b/chrome/browser/ui/cocoa/fullscreen_toolbar_controller.h
|
| @@ -2,8 +2,8 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#ifndef CHROME_BROWSER_UI_COCOA_PRESENTATION_MODE_CONTROLLER_H_
|
| -#define CHROME_BROWSER_UI_COCOA_PRESENTATION_MODE_CONTROLLER_H_
|
| +#ifndef CHROME_BROWSER_UI_COCOA_FULLSCREEN_TOOLBAR_CONTROLLER_H_
|
| +#define CHROME_BROWSER_UI_COCOA_FULLSCREEN_TOOLBAR_CONTROLLER_H_
|
|
|
| #include <Carbon/Carbon.h>
|
| #import <Cocoa/Cocoa.h>
|
| @@ -23,10 +23,7 @@ enum SlidingStyle {
|
| };
|
| } // namespace fullscreen_mac
|
|
|
| -// TODO(erikchen): This controller is misnamed. It manages the sliding tab
|
| -// strip and omnibox in all fullscreen modes.
|
| -
|
| -// Provides a controller to manage presentation mode for a single browser
|
| +// Provides a controller to fullscreen toolbar for a single browser
|
| // window. This class handles running animations, showing and hiding the
|
| // floating dropdown bar, and managing the tracking area associated with the
|
| // dropdown. This class does not directly manage any views -- the
|
| @@ -38,7 +35,7 @@ enum SlidingStyle {
|
| // when the animation finishes. This is largely done for ease of
|
| // implementation; it is easier to check the mouse location at each animation
|
| // step than it is to manage a constantly-changing tracking area.
|
| -@interface PresentationModeController : NSObject<NSAnimationDelegate> {
|
| +@interface FullscreenToolbarController : NSObject<NSAnimationDelegate> {
|
| @private
|
| // Our parent controller.
|
| BrowserWindowController* browserController_; // weak
|
| @@ -47,11 +44,11 @@ enum SlidingStyle {
|
| // mode.
|
| NSView* contentView_; // weak
|
|
|
| - // YES while this controller is in the process of entering presentation mode.
|
| - BOOL enteringPresentationMode_;
|
| + // YES while this controller is in the process of setting up for fullscreen.
|
| + BOOL settingUp_;
|
|
|
| - // Whether or not we are in presentation mode.
|
| - BOOL inPresentationMode_;
|
| + // Whether or not we are in fullscreen mode.
|
| + BOOL inFullscreenMode_;
|
|
|
| // The tracking area associated with the floating dropdown bar. This tracking
|
| // area is attached to |contentView_|, because when the dropdown is completely
|
| @@ -103,7 +100,6 @@ enum SlidingStyle {
|
| BOOL revealToolbarForTabStripChanges_;
|
| }
|
|
|
| -@property(readonly, nonatomic) BOOL inPresentationMode;
|
| @property(nonatomic, assign) fullscreen_mac::SlidingStyle slidingStyle;
|
| @property(nonatomic, assign) CGFloat toolbarFraction;
|
|
|
| @@ -112,15 +108,15 @@ enum SlidingStyle {
|
| style:(fullscreen_mac::SlidingStyle)style;
|
|
|
| // Informs the controller that the browser has entered or exited presentation
|
| -// mode. |-enterPresentationModeForContentView:showDropdown:| should be called
|
| -// after the window is setup, just before it is shown. |-exitPresentationMode|
|
| +// mode. |-setupFullscreenToolbarForContentView:showDropdown:| should be called
|
| +// after the window is setup, just before it is shown. |-exitFullscreenMode|
|
| // should be called before any views are moved back to the non-fullscreen
|
| -// window. If |-enterPresentationModeForContentView:showDropdown:| is called,
|
| -// it must be balanced with a call to |-exitPresentationMode| before the
|
| +// window. If |-setupFullscreenToolbarForContentView:showDropdown:| is called,
|
| +// it must be balanced with a call to |-exitFullscreenMode| before the
|
| // controller is released.
|
| -- (void)enterPresentationModeForContentView:(NSView*)contentView
|
| - showDropdown:(BOOL)showDropdown;
|
| -- (void)exitPresentationMode;
|
| +- (void)setupFullscreenToolbarForContentView:(NSView*)contentView
|
| + showDropdown:(BOOL)showDropdown;
|
| +- (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.
|
| @@ -158,7 +154,7 @@ enum SlidingStyle {
|
| @end
|
|
|
| // Private methods exposed for testing.
|
| -@interface PresentationModeController (ExposedForTesting)
|
| +@interface FullscreenToolbarController (ExposedForTesting)
|
| // Adjusts the AppKit Fullscreen options of the application.
|
| - (void)setSystemFullscreenModeTo:(base::mac::FullScreenMode)mode;
|
|
|
| @@ -176,4 +172,4 @@ enum SlidingStyle {
|
| extern NSString* const kWillEnterFullscreenNotification;
|
| extern NSString* const kWillLeaveFullscreenNotification;
|
|
|
| -#endif // CHROME_BROWSER_UI_COCOA_PRESENTATION_MODE_CONTROLLER_H_
|
| +#endif // CHROME_BROWSER_UI_COCOA_FULLSCREEN_TOOLBAR_CONTROLLER_H_
|
|
|