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

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

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
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_controller.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/browser_window_controller.mm
diff --git a/chrome/browser/ui/cocoa/browser_window_controller.mm b/chrome/browser/ui/cocoa/browser_window_controller.mm
index ca9e3b9d5731910b03a5c73914f93b473410f6b3..67acc08a906192fe788dd636bbc0ebaecd08e72e 100644
--- a/chrome/browser/ui/cocoa/browser_window_controller.mm
+++ b/chrome/browser/ui/cocoa/browser_window_controller.mm
@@ -2107,11 +2107,11 @@ willAnimateFromState:(BookmarkBar::State)oldState
return presentationModeController_.get() != nil;
}
-- (void)enterPresentationModeForURL:(const GURL&)url
- bubbleType:(FullscreenExitBubbleType)bubbleType {
- DCHECK(chrome::mac::SupportsSystemFullscreen());
- fullscreenUrl_ = url;
- fullscreenBubbleType_ = bubbleType;
+- (void)enterPresentationMode {
+ if (!chrome::mac::SupportsSystemFullscreen()) {
+ [self enterImmersiveFullscreen];
+ return;
+ }
if ([self isInAppKitFullscreen]) {
// Already in AppKit Fullscreen. Adjust the UI to use Presentation Mode.
@@ -2125,8 +2125,21 @@ willAnimateFromState:(BookmarkBar::State)oldState
}
}
-- (void)enterHTML5FullscreenForURL:(const GURL&)url
- bubbleType:(FullscreenExitBubbleType)bubbleType {
+- (void)enterExtensionFullscreenForURL:(const GURL&)url
+ bubbleType:(FullscreenExitBubbleType)bubbleType {
+ if (chrome::mac::SupportsSystemFullscreen()) {
+ fullscreenUrl_ = url;
+ fullscreenBubbleType_ = bubbleType;
+ [self enterPresentationMode];
+ } else {
+ [self enterImmersiveFullscreen];
+ DCHECK(!url.is_empty());
+ [self updateFullscreenExitBubbleURL:url bubbleType:bubbleType];
+ }
+}
+
+- (void)enterWebContentFullscreenForURL:(const GURL&)url
+ bubbleType:(FullscreenExitBubbleType)bubbleType {
[self enterImmersiveFullscreen];
if (!url.is_empty())
[self updateFullscreenExitBubbleURL:url bubbleType:bubbleType];
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698