Index: chrome/browser/ui/cocoa/browser_window_controller.h |
diff --git a/chrome/browser/ui/cocoa/browser_window_controller.h b/chrome/browser/ui/cocoa/browser_window_controller.h |
index 020e099718298395f48578c5ef3b6c6d9234eec9..5457874ade7a2b92c9b3907ae6f7bf28334c99e3 100644 |
--- a/chrome/browser/ui/cocoa/browser_window_controller.h |
+++ b/chrome/browser/ui/cocoa/browser_window_controller.h |
@@ -81,7 +81,6 @@ class Command; |
base::scoped_nsobject<OverlayableContentsController> |
overlayableContentsController_; |
base::scoped_nsobject<PresentationModeController> presentationModeController_; |
- base::scoped_nsobject<FullscreenModeController> fullscreenModeController_; |
base::scoped_nsobject<FullscreenExitBubbleController> |
fullscreenExitBubbleController_; |
@@ -132,8 +131,18 @@ class Command; |
// True between |-windowWillEnterFullScreen:| and |-windowDidEnterFullScreen:| |
// to indicate that the window is in the process of transitioning into |
- // fullscreen mode. |
- BOOL enteringFullscreen_; |
+ // AppKit fullscreen mode. |
+ BOOL enteringAppKitFullscreen_; |
+ |
+ // Only adjust the tab strip once while entering fullscreen. See the |
+ // implementation of -[BrowserWindowController updateSubviewZOrder:] for more |
+ // details. |
+ BOOL hasAdjustedTabStripWhileEnteringAppKitFullscreen_; |
+ |
+ // True between |enterImmersiveFullscreen| and |-windowDidEnterFullScreen:| |
+ // to indicate that the window is in the process of transitioning into |
+ // AppKit fullscreen mode. |
+ BOOL enteringImmersiveFullscreen_; |
// True between |-setPresentationMode:url:bubbleType:| and |
// |-windowDidEnterFullScreen:| to indicate that the window is in the process |
@@ -395,6 +404,69 @@ class Command; |
@end // @interface BrowserWindowController(WindowType) |
+// Fullscreen terminology: |
+// |
+// ---------------------------------------------------------------------------- |
+// There are 2 APIs that cause the window to get resized, and possibly move |
+// spaces. |
+// |
+// + AppKitFullscreen API: AppKit touts a feature known as "fullscreen". This |
+// involves moving the current window to a different space, and resizing the |
+// window to take up the entire size of the screen. |
+// |
+// + Immersive fullscreen: An alternative to AppKitFullscreen API. Uses on 10.6 |
+// (before AppKitFullscreen API was available), and on certain HTML/Flash |
+// content. This is a method defined by Chrome. |
+// |
+// The Immersive fullscreen API can be called after the AppKitFullscreen API. |
+// Calling the AppKitFullscreen API while immersive fullscreen API has been |
+// invoked causes all fullscreen modes to exit. |
+// |
+// ---------------------------------------------------------------------------- |
+// There are 3 "styles" of omnibox sliding. |
+// + OMNIBOX_TABS_PRESENT: Both the omnibox and the tabstrip are present. |
+// Moving the cursor to the top causes the menubar to appear, and everything |
+// else to slide down. |
+// + OMNIBOX_PRESENT: The tabstrip is hidden. Moving the cursor to the top |
+// shows the tabstrip and menubar, sliding everything else down. |
+// + OMNIBOX_TABS_HIDDEN: Both tabstrip and omnibox are hidden. Moving cursor |
+// to top shows tabstrip, omnibox, and menu bar. |
+// |
+// The omnibox sliding styles are used in conjunction with the fullscreen APIs. |
+// There is exactly 1 sliding style active at a time. The sliding is mangaged |
+// by the presentationModeController_. (poorly named). |
+// |
+// ---------------------------------------------------------------------------- |
+// There are several "fullscreen modes" bantered around. Technically, any |
+// fullscreen API can be combined with any sliding style. |
+// |
+// + System fullscreen***deprecated***: This term is confusing. Don't use it. |
+// It either refers to the AppKitFullscreen API, or the behavior that users |
+// expect to see when they click the fullscreen button, or some Chrome specific |
+// implementation that uses the AppKitFullscreen API. |
+// |
+// + Canonical Fullscreen: When a user clicks on the fullscreen button, they |
+// expect a fullscreen behavior similar to other AppKit apps. |
+// - AppKitFullscreen API + OMNIBOX_TABS_PRESENT. |
+// - The button click directly invokes the AppKitFullscreen API. This class |
+// get a callback, and calls adjustUIForOmniboxFullscreen. |
+// - There is a menu item that is intended to invoke the same behavior. When |
+// the user clicks the menu item, or use its hotkey, this class invokes the |
+// AppKitFullscreen API. |
+// |
+// + Presentation Mode: |
+// - OMNIBOX_TABS_HIDDEN, typically with AppKitFullscreen API, but can |
+// also be with Immersive fullscreen API. |
+// - This class sets a flag, indicating that it wants Presentation Mode |
+// instead of Canonical Fullscreen. Then it invokes the AppKitFullscreen API. |
+// |
+// + HTML5 fullscreen. <-- Currently uses AppKitFullscreen API. This should |
+// eventually migrate to the Immersive Fullscreen API. |
+// |
+// TODO(erikchen): Remove this. |
+// + Simplified fullscreen. Hidden by default. Some users have manually |
+// enabled it. |
+// - OMNIBOX_PRESENT. Can be with either fullscreen API. |
// Methods having to do with fullscreen and presentation mode. |
@interface BrowserWindowController(Fullscreen) |
@@ -403,43 +475,42 @@ class Command; |
// or exit Lion fullscreen mode. Must not be called on Snow Leopard or earlier. |
- (void)handleLionToggleFullscreen; |
-// Enters (or exits) fullscreen mode. This method is safe to call on all OS |
-// versions. |
-- (void)enterFullscreen; |
-- (void)exitFullscreen; |
+// Enters Canonical Fullscreen. |
+- (void)enterFullscreenWithChrome; |
// Updates the contents of the fullscreen exit bubble with |url| and |
// |bubbleType|. |
- (void)updateFullscreenExitBubbleURL:(const GURL&)url |
bubbleType:(FullscreenExitBubbleType)bubbleType; |
-// Returns fullscreen state: YES when the window is in fullscreen or is |
-// animating into fullscreen. |
-- (BOOL)isFullscreen; |
+// Returns YES if the browser window is in or entering any fullscreen mode. |
+- (BOOL)isInAnyFullscreenMode; |
-// Returns YES if the browser window is currently in fullscreen via the built-in |
-// immersive mechanism. |
+// Returns YES if the browser window is currently in or entering fullscreen via |
+// the built-in immersive mechanism. |
- (BOOL)isInImmersiveFullscreen; |
-// Returns YES if the browser window is currently in fullscreen via the Cocoa |
-// System Fullscreen API. |
-- (BOOL)isInSystemFullscreen; |
+// Returns YES if the browser window is currently in or entering fullscreen via |
+// the AppKit Fullscreen API. |
+- (BOOL)isInAppKitFullscreen; |
-// Enters (or exits) presentation mode. Also enters fullscreen mode if this |
-// window is not already fullscreen. This method is safe to call on all OS |
-// versions. |
+// Returns YES if the PresentationModeController exists and hence the omnibox |
+// and other UI is expected to slide. |
+- (BOOL)isInFullscreenWithOmniboxSliding; |
+ |
+// Enters (or exits) presentation mode. |
- (void)enterPresentationModeForURL:(const GURL&)url |
bubbleType:(FullscreenExitBubbleType)bubbleType; |
-- (void)exitPresentationMode; |
-// For simplified fullscreen: Enters fullscreen for a tab at a URL. The |url| |
-// is guaranteed to be non-empty; see -enterFullscreen for the user-initiated |
-// fullscreen mode. Called on Snow Leopard and Lion+. |
-- (void)enterFullscreenForURL:(const GURL&)url |
- bubbleType:(FullscreenExitBubbleType)bubbleType; |
+// Tries to enter presentation mode. Falls back to simplified fullscreen. |
+- (void)enterHTML5FullscreenForURL:(const GURL&)url |
+ bubbleType:(FullscreenExitBubbleType)bubbleType; |
+ |
+// Exits the current fullscreen mode. |
+- (void)exitAnyFullscreen; |
-// Returns presentation mode state. This method is safe to call on all OS |
-// versions. |
+// Whether the system is in the very specific fullscreen mode: Presentation |
+// Mode. |
- (BOOL)inPresentationMode; |
// Resizes the fullscreen window to fit the screen it's currently on. Called by |
@@ -447,11 +518,6 @@ class Command; |
// resolution. |
- (void)resizeFullscreenWindow; |
-// Gets or sets the fraction of the floating bar (presentation mode overlay) |
-// that is shown. 0 is completely hidden, 1 is fully shown. |
-- (CGFloat)floatingBarShownFraction; |
-- (void)setFloatingBarShownFraction:(CGFloat)fraction; |
- |
// Query/lock/release the requirement that the tab strip/toolbar/attached |
// bookmark bar bar cluster is visible (e.g., when one of its elements has |
// focus). This is required for the floating bar in presentation mode, but |