Index: chrome/browser/ui/fullscreen/fullscreen_controller.cc |
diff --git a/chrome/browser/ui/fullscreen/fullscreen_controller.cc b/chrome/browser/ui/fullscreen/fullscreen_controller.cc |
index 65781a5f512b1140f93978fa027cd89290d3d54f..236bc2ee22e60a4ef01a12f950277871503cf4ce 100644 |
--- a/chrome/browser/ui/fullscreen/fullscreen_controller.cc |
+++ b/chrome/browser/ui/fullscreen/fullscreen_controller.cc |
@@ -505,7 +505,12 @@ void FullscreenController::ToggleFullscreenModeInternal(bool for_tab) { |
if (toggled_into_fullscreen_) { |
window_->EnterFullscreen(url, GetFullscreenExitBubbleType()); |
} else { |
- window_->ExitFullscreen(); |
+#if defined(OS_MACOSX) |
scheib
2012/08/03 02:45:58
The #if MAC sections in this file make the logic c
Robert Sesek
2012/08/03 14:44:08
Yes, that's something I want to do. I think most o
|
+ if (window_->InPresentationMode()) |
+ window_->ExitPresentationMode(); |
+ else |
+#endif |
+ window_->ExitFullscreen(); |
extension_caused_fullscreen_ = GURL(); |
} |
UpdateFullscreenExitBubbleContent(); |
@@ -525,10 +530,10 @@ void FullscreenController::TogglePresentationModeInternal(bool for_tab) { |
tab_fullscreen_accepted_ = toggled_into_fullscreen_ && |
GetFullscreenSetting(url) == CONTENT_SETTING_ALLOW; |
} |
- if (toggled_into_fullscreen_) |
+ if (!window_->InPresentationMode()) |
window_->EnterPresentationMode(url, GetFullscreenExitBubbleType()); |
else |
- window_->ExitPresentationMode(); |
+ window_->ExitFullscreen(); |
UpdateFullscreenExitBubbleContent(); |
// WindowFullscreenStateChanged will be called by BrowserWindowController |