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

Unified Diff: chrome/browser/ui/fullscreen_controller.cc

Issue 10578012: Neuter alternate methods of entering fullscreen mode when in metro snap (via extension and via JS f… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup. Created 8 years, 6 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/views/frame/browser_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | chrome/browser/ui/views/frame/browser_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698