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

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

Issue 32943006: [Refactor] Replace kFullscreenUsesMinimalChromeKey with WindowState::hide_shelf_when_fullscreen() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 2 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/ash/chrome_shell_delegate_browsertest.cc ('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/immersive_mode_controller_ash.cc
diff --git a/chrome/browser/ui/views/frame/immersive_mode_controller_ash.cc b/chrome/browser/ui/views/frame/immersive_mode_controller_ash.cc
index 5acb8a9260cb2e06ea9f5f6a1eb0c0f6c19364ea..5be7579e972923505fda7db9e83f7a9840391ce2 100644
--- a/chrome/browser/ui/views/frame/immersive_mode_controller_ash.cc
+++ b/chrome/browser/ui/views/frame/immersive_mode_controller_ash.cc
@@ -9,7 +9,7 @@
#include "ash/ash_switches.h"
#include "ash/shell.h"
-#include "ash/wm/window_properties.h"
+#include "ash/wm/window_state.h"
#include "base/command_line.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/ui/fullscreen/fullscreen_controller.h"
@@ -914,8 +914,12 @@ void ImmersiveModeControllerAsh::UpdateUseMinimalChrome(Layout layout) {
bool in_tab_fullscreen = fullscreen_controller ?
fullscreen_controller->IsFullscreenForTabOrPending() : false;
bool use_minimal_chrome = !in_tab_fullscreen && enabled_;
- native_window_->SetProperty(ash::internal::kFullscreenUsesMinimalChromeKey,
- use_minimal_chrome);
+
+ // When using minimal chrome, the shelf is auto-hidden. The auto-hidden shelf
+ // displays a 3px 'light bar' when it is closed. Otherwise, the shelf is
+ // hidden completely and cannot be revealed.
+ ash::wm::GetWindowState(native_window_)->set_hide_shelf_when_fullscreen(
+ !use_minimal_chrome);
TabIndicatorVisibility previous_tab_indicator_visibility =
tab_indicator_visibility_;
@@ -924,12 +928,7 @@ void ImmersiveModeControllerAsh::UpdateUseMinimalChrome(Layout layout) {
TAB_INDICATORS_SHOW : TAB_INDICATORS_HIDE;
}
- // Ash on Windows may not have a shell.
- if (ash::Shell::HasInstance()) {
- // When using minimal chrome, the shelf is auto-hidden. The auto-hidden
- // shelf displays a 3px 'light bar' when it is closed.
- ash::Shell::GetInstance()->UpdateShelfVisibility();
- }
+ ash::Shell::GetInstance()->UpdateShelfVisibility();
if (tab_indicator_visibility_ != previous_tab_indicator_visibility) {
// If the top-of-window views are revealed or animating, the change will
« no previous file with comments | « chrome/browser/ui/ash/chrome_shell_delegate_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698