Index: chrome/browser/ui/cocoa/browser_window_cocoa.mm |
diff --git a/chrome/browser/ui/cocoa/browser_window_cocoa.mm b/chrome/browser/ui/cocoa/browser_window_cocoa.mm |
index d3f93db6aa74030fdfaaa18cfc330f0ef7dc6730..ca8305e82e256e73f83516e690392c0852a189dc 100644 |
--- a/chrome/browser/ui/cocoa/browser_window_cocoa.mm |
+++ b/chrome/browser/ui/cocoa/browser_window_cocoa.mm |
@@ -355,22 +355,11 @@ void BrowserWindowCocoa::Restore() { |
void BrowserWindowCocoa::EnterFullscreen( |
const GURL& url, FullscreenExitBubbleType bubble_type) { |
- // When simplified fullscreen is enabled, always enter normal fullscreen. |
- const CommandLine* command_line = CommandLine::ForCurrentProcess(); |
- if (command_line->HasSwitch(switches::kEnableSimplifiedFullscreen)) { |
- if (url.is_empty()) |
- [controller_ enterFullscreen]; |
- else |
- [controller_ enterFullscreenForURL:url bubbleType:bubble_type]; |
- return; |
- } |
- |
- [controller_ enterPresentationModeForURL:url |
- bubbleType:bubble_type]; |
+ [controller_ enterHTML5FullscreenForURL:url bubbleType:bubble_type]; |
} |
void BrowserWindowCocoa::ExitFullscreen() { |
- [controller_ exitFullscreen]; |
+ [controller_ exitGenericFullscreen]; |
} |
void BrowserWindowCocoa::UpdateFullscreenExitBubbleContent( |
@@ -385,9 +374,7 @@ bool BrowserWindowCocoa::ShouldHideUIForFullscreen() const { |
} |
bool BrowserWindowCocoa::IsFullscreen() const { |
- if ([controller_ inPresentationMode]) |
- CHECK([controller_ isFullscreen]); // Presentation mode must be fullscreen. |
- return [controller_ isFullscreen]; |
+ return [controller_ isInAnyFullscreenMode]; |
} |
bool BrowserWindowCocoa::IsFullscreenBubbleVisible() const { |
@@ -623,10 +610,7 @@ void BrowserWindowCocoa::EnterFullscreenWithChrome() { |
DCHECK(!command_line->HasSwitch(switches::kEnableSimplifiedFullscreen)); |
CHECK(chrome::mac::SupportsSystemFullscreen()); |
- if ([controller_ inPresentationMode]) |
- [controller_ exitPresentationMode]; |
- else |
- [controller_ enterFullscreen]; |
+ [controller_ enterFullscreenWithChrome]; |
} |
bool BrowserWindowCocoa::IsFullscreenWithChrome() { |
@@ -650,7 +634,7 @@ bool BrowserWindowCocoa::IsFullscreenWithoutChrome() { |
WindowOpenDisposition BrowserWindowCocoa::GetDispositionForPopupBounds( |
const gfx::Rect& bounds) { |
// When using Cocoa's System Fullscreen mode, convert popups into tabs. |
- if ([controller_ isInSystemFullscreen]) |
+ if ([controller_ isInAppKitFullscreen]) |
return NEW_FOREGROUND_TAB; |
return NEW_POPUP; |
} |