| Index: ash/shelf/shelf_layout_manager.cc
|
| diff --git a/ash/shelf/shelf_layout_manager.cc b/ash/shelf/shelf_layout_manager.cc
|
| index 1376d72dcc47cd2968021b137a46179239242ad9..b9dc54f5da98cf0966856a8111e16d56f611ee5b 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) {
|
| + 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.
|
|
|