| Index: chrome/browser/ui/browser.cc
|
| diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
|
| index bd221324a48707e3d077e8616bbcf3923e937611..ec2aa7360811d23a9aee4e340f9232049a92a49a 100644
|
| --- a/chrome/browser/ui/browser.cc
|
| +++ b/chrome/browser/ui/browser.cc
|
| @@ -1314,7 +1314,13 @@ void Browser::WindowFullscreenStateChanged() {
|
| MessageLoop::current()->PostTask(
|
| FROM_HERE, method_factory_.NewRunnableMethod(
|
| &Browser::NotifyFullscreenChange));
|
| - if (!window_->IsFullscreen())
|
| + bool notify_tab_of_exit;
|
| +#if defined(OS_MACOSX)
|
| + notify_tab_of_exit = !window_->InPresentationMode();
|
| +#else
|
| + notify_tab_of_exit = !window_->IsFullscreen();
|
| +#endif
|
| + if (notify_tab_of_exit)
|
| NotifyTabOfFullscreenExitIfNecessary();
|
| }
|
|
|
| @@ -3831,10 +3837,21 @@ void Browser::ToggleFullscreenModeForTab(TabContents* tab,
|
| return;
|
| fullscreened_tab_ = enter_fullscreen ?
|
| TabContentsWrapper::GetCurrentWrapperForContents(tab) : NULL;
|
| - if (enter_fullscreen && !window_->IsFullscreen())
|
| + bool in_correct_mode_for_tab_fullscreen;
|
| +#if defined(OS_MACOSX)
|
| + in_correct_mode_for_tab_fullscreen = window_->InPresentationMode();
|
| +#else
|
| + in_correct_mode_for_tab_fullscreen = window_->IsFullscreen();
|
| +#endif
|
| + if (enter_fullscreen && !in_correct_mode_for_tab_fullscreen)
|
| tab_caused_fullscreen_ = true;
|
| - if (tab_caused_fullscreen_)
|
| + if (tab_caused_fullscreen_) {
|
| +#if defined(OS_MACOSX)
|
| + TogglePresentationMode();
|
| +#else
|
| ToggleFullscreenMode();
|
| +#endif
|
| + }
|
| }
|
|
|
| void Browser::JSOutOfMemory(TabContents* tab) {
|
|
|