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 0f68dab4a7a65bc3264ef8a76a2d65786443a2bc..df4ebade807ba85197f515531684a2647656005a 100644 |
--- a/chrome/browser/ui/cocoa/browser_window_cocoa.mm |
+++ b/chrome/browser/ui/cocoa/browser_window_cocoa.mm |
@@ -336,8 +336,8 @@ void BrowserWindowCocoa::Restore() { |
void BrowserWindowCocoa::EnterFullscreen( |
const GURL& url, FullscreenExitBubbleType bubble_type) { |
- [controller_ enterFullscreenForURL:url |
- bubbleType:bubble_type]; |
+ [controller_ enterPresentationModeForURL:url |
Robert Sesek
2013/01/18 19:41:35
Why is this switching to enterPresentationMode? Sh
scheib
2013/01/18 22:12:33
The goal is that 'EnterFullscreen' goes to a fulls
Robert Sesek
2013/01/18 22:19:12
Got it and SGTM.
This may need a change in Browse
|
+ bubbleType:bubble_type]; |
} |
void BrowserWindowCocoa::ExitFullscreen() { |
@@ -351,6 +351,8 @@ void BrowserWindowCocoa::UpdateFullscreenExitBubbleContent( |
} |
bool BrowserWindowCocoa::IsFullscreen() const { |
+ if ([controller_ inPresentationMode]) |
+ CHECK([controller_ isFullscreen]); // Presentation mode must be fullscreen. |
return [controller_ isFullscreen]; |
} |
@@ -591,19 +593,22 @@ void BrowserWindowCocoa::OpenTabpose() { |
[controller_ openTabpose]; |
} |
-void BrowserWindowCocoa::EnterPresentationMode( |
+void BrowserWindowCocoa::EnterFullscreenWithChrome( |
const GURL& url, |
Robert Sesek
2013/01/18 19:41:35
Can this URL ever be non-empty? I don't think a we
scheib
2013/01/23 18:13:37
Done.
|
FullscreenExitBubbleType bubble_type) { |
- [controller_ enterPresentationModeForURL:url |
- bubbleType:bubble_type]; |
+ if ([controller_ inPresentationMode]) |
+ [controller_ exitPresentationMode]; |
+ else |
+ [controller_ enterFullscreenForURL:url |
+ bubbleType:bubble_type]; |
} |
-void BrowserWindowCocoa::ExitPresentationMode() { |
- [controller_ exitPresentationMode]; |
+bool BrowserWindowCocoa::IsFullscreenWithChrome() { |
+ return IsFullscreen() && ![controller_ inPresentationMode]; |
} |
-bool BrowserWindowCocoa::InPresentationMode() { |
- return [controller_ inPresentationMode]; |
+bool BrowserWindowCocoa::IsFullscreenWithoutChrome() { |
+ return IsFullscreen() && [controller_ inPresentationMode]; |
} |
gfx::Rect BrowserWindowCocoa::GetInstantBounds() { |