| Index: chrome/browser/ui/fullscreen_controller.cc
|
| diff --git a/chrome/browser/ui/fullscreen_controller.cc b/chrome/browser/ui/fullscreen_controller.cc
|
| index b87532864a24622f99ea67f8d293d9fec6f61530..d4039b73814a135a7601fdcd130b8eea8558a126 100644
|
| --- a/chrome/browser/ui/fullscreen_controller.cc
|
| +++ b/chrome/browser/ui/fullscreen_controller.cc
|
| @@ -130,6 +130,15 @@ void FullscreenController::ToggleFullscreenModeForTab(WebContents* web_contents,
|
| if (web_contents != browser_->GetActiveWebContents())
|
| return;
|
|
|
| +#if defined(OS_WIN)
|
| + // For now, avoid breaking when initiating full screen tab mode while in
|
| + // a metro snap.
|
| + // TODO(robertshield): Find a way to reconcile tab-initiated fullscreen
|
| + // modes with metro snap.
|
| + if (IsInMetroSnapMode())
|
| + return;
|
| +#endif
|
| +
|
| bool in_browser_or_tab_fullscreen_mode;
|
| #if defined(OS_MACOSX)
|
| in_browser_or_tab_fullscreen_mode = window_->InPresentationMode();
|
| @@ -178,6 +187,7 @@ void FullscreenController::ToggleFullscreenModeForTab(WebContents* web_contents,
|
|
|
| #if defined(OS_WIN)
|
| void FullscreenController::SetMetroSnapMode(bool enable) {
|
| + toggled_into_fullscreen_ = false;
|
| window_->SetMetroSnapMode(enable);
|
| }
|
| #endif
|
| @@ -492,6 +502,12 @@ void FullscreenController::TogglePresentationModeInternal(bool for_tab) {
|
|
|
| // TODO(koz): Change |for_tab| to an enum.
|
| void FullscreenController::ToggleFullscreenModeInternal(bool for_tab) {
|
| +#if defined(OS_WIN)
|
| + // When in Metro snap mode, toggling in and out of fullscreen is prevented.
|
| + if (IsInMetroSnapMode())
|
| + return;
|
| +#endif
|
| +
|
| toggled_into_fullscreen_ = !window_->IsFullscreen();
|
|
|
| // In kiosk mode, we always want to be fullscreen. When the browser first
|
|
|