Index: ash/shelf/shelf_layout_manager.cc |
diff --git a/ash/shelf/shelf_layout_manager.cc b/ash/shelf/shelf_layout_manager.cc |
index 4757e88f73fb9edf15034e6399e773f71968ae91..8bc641fa75610dc268aafd28a8afc8a825406f86 100644 |
--- a/ash/shelf/shelf_layout_manager.cc |
+++ b/ash/shelf/shelf_layout_manager.cc |
@@ -313,6 +313,8 @@ void ShelfLayoutManager::UpdateVisibilityState() { |
if (state_.is_screen_locked || state_.is_adding_user_screen) { |
SetState(SHELF_VISIBLE); |
+ } else if (state_.is_pinned) { |
oshima
2016/06/18 04:47:44
can't we just use WmShell::Get()->IsPinned()?
hidehiko
2016/06/18 05:32:45
Ditto for workspalce_layout_manager.
|
+ SetState(SHELF_HIDDEN); |
} else { |
// TODO(zelidrag): Verify shelf drag animation still shows on the device |
// when we are in SHELF_AUTO_HIDE_ALWAYS_HIDDEN. |
@@ -549,6 +551,11 @@ void ShelfLayoutManager::OnShelfAutoHideBehaviorChanged(WmWindow* root_window) { |
UpdateVisibilityState(); |
} |
+void ShelfLayoutManager::OnPinnedStateChanged(WmWindow* pinned_window) { |
+ state_.is_pinned = pinned_window->GetWindowState()->IsPinned(); |
+ UpdateVisibilityState(); |
+} |
+ |
void ShelfLayoutManager::OnWindowActivated( |
aura::client::ActivationChangeObserver::ActivationReason reason, |
aura::Window* gained_active, |
@@ -586,6 +593,7 @@ void ShelfLayoutManager::SetState(ShelfVisibilityState visibility_state) { |
// Preserve the log in screen states. |
state.is_adding_user_screen = state_.is_adding_user_screen; |
state.is_screen_locked = state_.is_screen_locked; |
+ state.is_pinned = state_.is_pinned; |
// Force an update because gesture drags affect the shelf bounds and we |
// should animate back to the normal bounds at the end of a gesture. |