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

Unified Diff: ash/shelf/shelf_layout_manager.cc

Issue 14340007: Hide the tab indicators and the shelf when in immersive + tab fullscreen (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed kImmersiveModeKey Created 7 years, 8 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: ash/shelf/shelf_layout_manager.cc
diff --git a/ash/shelf/shelf_layout_manager.cc b/ash/shelf/shelf_layout_manager.cc
index aa3ab2f23ace794786c43d683555bd5b762e6c35..7680c23d2b9bb80c4348ea6da028b0820f74b001 100644
--- a/ash/shelf/shelf_layout_manager.cc
+++ b/ash/shelf/shelf_layout_manager.cc
@@ -19,6 +19,7 @@
#include "ash/system/status_area_widget.h"
#include "ash/wm/property_util.h"
#include "ash/wm/window_cycle_controller.h"
+#include "ash/wm/window_properties.h"
#include "ash/wm/window_util.h"
#include "ash/wm/workspace_controller.h"
#include "ash/wm/workspace/workspace_animations.h"
@@ -276,18 +277,21 @@ void ShelfLayoutManager::UpdateVisibilityState() {
// TODO(zelidrag): Verify shelf drag animation still shows on the device
// when we are in SHELF_AUTO_HIDE_ALWAYS_HIDDEN.
SetState(CalculateShelfVisibilityWhileDragging());
- } else if (GetRootWindowController(root_window_)->IsImmersiveMode()) {
- // The user choosing immersive mode indicates he or she wants to maximize
- // screen real-estate for content, so always auto-hide the shelf.
- DCHECK_NE(auto_hide_behavior_, SHELF_AUTO_HIDE_ALWAYS_HIDDEN);
- SetState(SHELF_AUTO_HIDE);
} else {
WorkspaceWindowState window_state(workspace_controller_->GetWindowState());
switch (window_state) {
case WORKSPACE_WINDOW_STATE_FULL_SCREEN:
- SetState(SHELF_HIDDEN);
+ {
+ aura::Window* fullscreen_window =
+ GetRootWindowController(root_window_)->GetFullscreenWindow();
+ if (fullscreen_window->GetProperty(kFullscreenUsesMinimalChromeKey)) {
+ DCHECK_NE(auto_hide_behavior_, SHELF_AUTO_HIDE_ALWAYS_HIDDEN);
+ SetState(SHELF_AUTO_HIDE);
+ } else {
+ SetState(SHELF_HIDDEN);
+ }
break;
-
+ }
case WORKSPACE_WINDOW_STATE_MAXIMIZED:
SetState(CalculateShelfVisibility());
break;

Powered by Google App Engine
This is Rietveld 408576698