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

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: Comments from rsesek. 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..9815683936c116ed9bb4d265467185f7c9c8b21b 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 "Enter Full Screen".
+// -- This invokes FullscreenController::ToggleFullscreenModeInternal(
+// BROWSER_WITH_CHROME)
+// - User selects the menu item "Enter 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 JavaScript apis.
+// -- 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;
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_cocoa.mm ('k') | chrome/browser/ui/cocoa/browser_window_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698