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; |