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

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: Removed maximize behavior for task manager to be consistent with how F11 works on other platforms 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
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 e86737252572553f9889ca921cee2ca0ec5a96f6..c6b68fe888393d161e63ab9b6b42f2b111f377b1 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);
@@ -2389,7 +2380,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();
@@ -2397,7 +2388,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));
}
@@ -2420,6 +2411,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);
« no previous file with comments | « 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