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

Unified Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 17515005: Do not put v1 app windows or popup windows into immersive fullscreen (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
Index: chrome/browser/ui/views/frame/browser_view.cc
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc
index df661dc2833da98196a92f78ac6149b1183b12ee..dec5ac81df4d671cf1acc0910d7164f5e758827c 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -248,15 +248,6 @@ bool ShouldSaveOrRestoreWindowPos() {
return true;
}
-// Returns whether immersive mode should replace fullscreen, which should only
-// occur for "browser-fullscreen" and not for "tab-fullscreen" (which has a URL
-// for the tab entering fullscreen).
-bool UseImmersiveFullscreenForUrl(const GURL& url) {
- bool is_browser_fullscreen = url.is_empty();
- return is_browser_fullscreen &&
- ImmersiveFullscreenConfiguration::UseImmersiveFullscreen();
-}
-
} // namespace
///////////////////////////////////////////////////////////////////////////////
@@ -886,7 +877,7 @@ void BrowserView::UpdateFullscreenExitBubbleContent(
// Immersive mode has no exit bubble because it has a visible strip at the
// top that gives the user a hover target.
// TODO(jamescook): Figure out what to do with mouse-lock.
- if (bubble_type == FEB_TYPE_NONE || UseImmersiveFullscreenForUrl(url)) {
+ if (bubble_type == FEB_TYPE_NONE || ShouldUseImmersiveFullscreenForUrl(url)) {
fullscreen_bubble_.reset();
} else if (fullscreen_bubble_.get()) {
fullscreen_bubble_->UpdateContent(url, bubble_type);
@@ -2396,7 +2387,7 @@ void BrowserView::ProcessFullscreen(bool fullscreen,
}
// Enable immersive before the browser refreshes its list of enabled commands.
- if (UseImmersiveFullscreenForUrl(url))
+ if (ShouldUseImmersiveFullscreenForUrl(url))
immersive_mode_controller_->SetEnabled(fullscreen);
browser_->WindowFullscreenStateChanged();
@@ -2404,7 +2395,7 @@ void BrowserView::ProcessFullscreen(bool fullscreen,
if (fullscreen) {
if (!chrome::IsRunningInAppMode() &&
type != FOR_METRO &&
- !UseImmersiveFullscreenForUrl(url)) {
+ !ShouldUseImmersiveFullscreenForUrl(url)) {
fullscreen_bubble_.reset(new FullscreenExitBubbleViews(
this, url, bubble_type));
}
@@ -2427,6 +2418,12 @@ void BrowserView::ProcessFullscreen(bool fullscreen,
ToolbarSizeChanged(false);
}
+bool BrowserView::ShouldUseImmersiveFullscreenForUrl(const GURL& url) const {
+ bool is_browser_fullscreen = url.is_empty();
+ return ImmersiveFullscreenConfiguration::UseImmersiveFullscreen() &&
+ is_browser_fullscreen && IsBrowserTypeNormal();
+}
+
void BrowserView::LoadAccelerators() {
#if defined(OS_WIN) && !defined(USE_AURA)
HACCEL accelerator_table = AtlLoadAccelerators(IDR_MAINFRAME);
« chrome/browser/ui/views/frame/browser_view.h ('K') | « chrome/browser/ui/views/frame/browser_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698