Chromium Code Reviews| Index: ash/common/shelf/shelf_layout_manager.cc |
| diff --git a/ash/common/shelf/shelf_layout_manager.cc b/ash/common/shelf/shelf_layout_manager.cc |
| index f145a7ec82f3f9eb14bb1c981143f7e798aa261a..31e600ef7c1ec2b86e5bbca7418a09d3d20b9d3c 100644 |
| --- a/ash/common/shelf/shelf_layout_manager.cc |
| +++ b/ash/common/shelf/shelf_layout_manager.cc |
| @@ -25,6 +25,7 @@ |
| #include "ash/public/cpp/shell_window_ids.h" |
| #include "ash/root_window_controller.h" |
| #include "ash/shell.h" |
| +#include "ash/wm/window_state_aura.h" |
| #include "base/auto_reset.h" |
| #include "base/command_line.h" |
| #include "base/i18n/rtl.h" |
| @@ -243,6 +244,13 @@ void ShelfLayoutManager::UpdateVisibilityState() { |
| } else if (WmShell::Get()->IsPinned()) { |
| SetState(SHELF_HIDDEN); |
| } else { |
| + wm::WindowState* active_window = wm::GetActiveWindowState(); |
| + |
| + if (active_window && active_window->hide_shelf_when_active()) { |
| + SetState(SHELF_AUTO_HIDE); |
| + return; |
| + } |
|
oshima
2017/03/30 14:01:27
This should happen only when the WORKSPACE_WINDOW_
yorkelee
2017/03/30 19:34:12
Done.
|
| + |
| // TODO(zelidrag): Verify shelf drag animation still shows on the device |
| // when we are in SHELF_AUTO_HIDE_ALWAYS_HIDDEN. |
| wm::WorkspaceWindowState window_state( |