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

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

Issue 198413003: Enable immersive fullscreen on Windows Ash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix comment about the top pixel. Created 6 years, 9 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 c91590da652bb757ee0ef4e38ff42f0d47480ba3..036319a60ec789d1b334e30fb111cc284414a815 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -913,14 +913,14 @@ void BrowserView::EnterFullscreen(
if (IsFullscreen())
return; // Nothing to do.
- ProcessFullscreen(true, FOR_DESKTOP, url, bubble_type);
+ ProcessFullscreen(true, NORMAL_FULLSCREEN, url, bubble_type);
}
void BrowserView::ExitFullscreen() {
if (!IsFullscreen())
return; // Nothing to do.
- ProcessFullscreen(false, FOR_DESKTOP, GURL(), FEB_TYPE_NONE);
+ ProcessFullscreen(false, NORMAL_FULLSCREEN, GURL(), FEB_TYPE_NONE);
}
void BrowserView::UpdateFullscreenExitBubbleContent(
@@ -958,7 +958,7 @@ bool BrowserView::IsFullscreenBubbleVisible() const {
#if defined(OS_WIN)
void BrowserView::SetMetroSnapMode(bool enable) {
HISTOGRAM_COUNTS("Metro.SnapModeToggle", enable);
- ProcessFullscreen(enable, FOR_METRO, GURL(), FEB_TYPE_NONE);
+ ProcessFullscreen(enable, METRO_SNAP_FULLSCREEN, GURL(), FEB_TYPE_NONE);
}
bool BrowserView::IsInMetroSnapMode() const {
@@ -980,7 +980,7 @@ void BrowserView::SetWindowSwitcherButton(views::Button* button) {
void BrowserView::FullscreenStateChanged() {
CHECK(!IsFullscreen());
- ProcessFullscreen(false, FOR_DESKTOP, GURL(), FEB_TYPE_NONE);
+ ProcessFullscreen(false, NORMAL_FULLSCREEN, GURL(), FEB_TYPE_NONE);
}
void BrowserView::ToolbarSizeChanged(bool is_animating) {
@@ -2173,7 +2173,7 @@ void BrowserView::UpdateUIForContents(WebContents* contents) {
}
void BrowserView::ProcessFullscreen(bool fullscreen,
- FullscreenType type,
+ FullscreenMode mode,
const GURL& url,
FullscreenExitBubbleType bubble_type) {
if (in_process_fullscreen_)
@@ -2186,7 +2186,7 @@ void BrowserView::ProcessFullscreen(bool fullscreen,
// thus are slow and look ugly (enforced via |in_process_fullscreen_|).
LocationBarView* location_bar = GetLocationBarView();
- if (type == FOR_METRO || !fullscreen) {
+ if (mode == METRO_SNAP_FULLSCREEN || !fullscreen) {
// Hide the fullscreen bubble as soon as possible, since the mode toggle can
// take enough time for the user to notice.
fullscreen_bubble_.reset();
@@ -2205,13 +2205,15 @@ void BrowserView::ProcessFullscreen(bool fullscreen,
frame_->SetFullscreen(fullscreen);
// Enable immersive before the browser refreshes its list of enabled commands.
- if (ShouldUseImmersiveFullscreenForUrl(url))
+ if (mode != METRO_SNAP_FULLSCREEN && ShouldUseImmersiveFullscreenForUrl(url))
immersive_mode_controller_->SetEnabled(fullscreen);
browser_->WindowFullscreenStateChanged();
- if (fullscreen && !chrome::IsRunningInAppMode() && type != FOR_METRO)
+ if (fullscreen && !chrome::IsRunningInAppMode() &&
+ mode != METRO_SNAP_FULLSCREEN) {
UpdateFullscreenExitBubbleContent(url, bubble_type);
+ }
// Undo our anti-jankiness hacks and force a re-layout. We also need to
// recompute the height of the infobar top arrow because toggling in and out
@@ -2228,11 +2230,14 @@ bool BrowserView::ShouldUseImmersiveFullscreenForUrl(const GURL& url) const {
// Kiosk mode needs the whole screen.
if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kKioskMode))
return false;
- bool is_browser_fullscreen = url.is_empty();
- return is_browser_fullscreen;
-#else
- return false;
#endif
+
+#if defined(USE_ASH)
pkotwicz 2014/03/18 14:56:47 Is the #if defined() necessary here?
pkotwicz 2014/03/18 19:35:28 You still need to address this comment too?
zturner 2014/03/18 20:54:55 Linux Aura still doesn't support Ash, so I believe
pkotwicz 2014/03/18 21:54:32 Linux Aura should have HOST_DESKTOP_TYPE_ASH defin
zturner 2014/03/18 22:35:44 Fair enough. Done.
+ if (browser()->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_ASH)
+ return url.is_empty();
+#endif
+
+ return false;
}
void BrowserView::LoadAccelerators() {

Powered by Google App Engine
This is Rietveld 408576698