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

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

Issue 493143004: mac: Major fullscreen refactor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix unit tests. Created 6 years, 4 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 | « no previous file | chrome/browser/ui/cocoa/browser_window_cocoa_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 51974a1e79293b2c8b11d221517290fb9689b9ad..cb0836427ce5aac3bd634eada68834f0877e7472 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_ exitAnyFullscreen];
}
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 {
@@ -624,10 +611,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() {
@@ -651,7 +635,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;
}
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/browser_window_cocoa_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698