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

Unified Diff: chrome/browser/ui/cocoa/browser_window_controller.h

Issue 575653003: Mac: Fix accidental changes to fullscreen logic from refactor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fullscreen_layout_refactor3
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
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 2cd96f2558a941fe70dacccecd53012c666d985b..978f8a99de2a3bf22629f93dfa2ca00f9da2fd7a 100644
--- a/chrome/browser/ui/cocoa/browser_window_controller.h
+++ b/chrome/browser/ui/cocoa/browser_window_controller.h
@@ -463,6 +463,31 @@ class Command;
//
// + HTML5 fullscreen. <-- Currently uses AppKitFullscreen API. This should
// eventually migrate to the Immersive Fullscreen API.
+//
+// There are more fullscreen styles on OSX than other OSes. However, all OSes
+// share the same cross-platform code for entering fullscreen
+// (FullscreenController). It is important for OSX fullscreen logic to track
+// how the user triggered fullscreen mode.
+// There are currently 5 possible mechanisms:
+// - User clicks the AppKit Fullscreen button.
+// -- This invokes -[BrowserWindowController windowWillEnterFullscreen:]
+// - User selects the menu item corresponding to "Canonical Fullscreen".
Robert Sesek 2014/09/16 15:49:02 We're not going to call it that in the menu, so th
erikchen 2014/09/16 17:12:36 I was intentionally using the internal names for t
+// -- This invokes FullscreenController::ToggleFullscreenModeInternal(
+// BROWSER_WITH_CHROME)
+// - User selects the menu item corresponding to "Presentation Mode".
+// -- This invokes FullscreenController::ToggleFullscreenModeInternal(
+// BROWSER)
+// -- The corresponding URL will be empty.
+// - User requests fullscreen via an extension.
+// -- This invokes FullscreenController::ToggleFullscreenModeInternal(
+// BROWSER)
+// -- The corresponding URL will be the url of the extension.
+// - User requests fullscreen via Flash or js apis.
Robert Sesek 2014/09/16 15:49:02 js -> JavaScript
erikchen 2014/09/16 17:12:36 Done.
+// -- This invokes FullscreenController::ToggleFullscreenModeInternal(
+// BROWSER)
+// -- browser_->fullscreen_controller()->
+// IsWindowFullscreenForTabOrPending() returns true.
+// -- The corresponding URL will be the url of the web page.
// Methods having to do with fullscreen and presentation mode.
@interface BrowserWindowController(Fullscreen)
@@ -494,13 +519,16 @@ class Command;
// and other UI is expected to slide.
- (BOOL)isInFullscreenWithOmniboxSliding;
-// Enters (or exits) presentation mode.
-- (void)enterPresentationModeForURL:(const GURL&)url
- bubbleType:(FullscreenExitBubbleType)bubbleType;
+// Enters presentation mode.
+- (void)enterPresentationMode;
+
+// Enter fullscreen for an extension.
+- (void)enterExtensionFullscreenForURL:(const GURL&)url
+ bubbleType:(FullscreenExitBubbleType)bubbleType;
// Enters Immersive Fullscreen for the given URL.
-- (void)enterHTML5FullscreenForURL:(const GURL&)url
- bubbleType:(FullscreenExitBubbleType)bubbleType;
+- (void)enterWebContentFullscreenForURL:(const GURL&)url
+ bubbleType:(FullscreenExitBubbleType)bubbleType;
// Exits the current fullscreen mode.
- (void)exitAnyFullscreen;

Powered by Google App Engine
This is Rietveld 408576698