| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ash/common/shelf/shelf_layout_manager.h" | 5 #include "ash/common/shelf/shelf_layout_manager.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 951 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 962 void ShelfLayoutManager::OnLockStateEvent(LockStateObserver::EventType event) { | 962 void ShelfLayoutManager::OnLockStateEvent(LockStateObserver::EventType event) { |
| 963 if (event == EVENT_LOCK_ANIMATION_STARTED) { | 963 if (event == EVENT_LOCK_ANIMATION_STARTED) { |
| 964 // Enter the screen locked state and update the visibility to avoid an odd | 964 // Enter the screen locked state and update the visibility to avoid an odd |
| 965 // animation when transitioning the orientation from L/R to bottom. | 965 // animation when transitioning the orientation from L/R to bottom. |
| 966 state_.is_screen_locked = true; | 966 state_.is_screen_locked = true; |
| 967 UpdateShelfVisibilityAfterLoginUIChange(); | 967 UpdateShelfVisibilityAfterLoginUIChange(); |
| 968 } | 968 } |
| 969 } | 969 } |
| 970 | 970 |
| 971 void ShelfLayoutManager::SessionStateChanged( | 971 void ShelfLayoutManager::SessionStateChanged( |
| 972 SessionStateDelegate::SessionState state) { | 972 session_manager::SessionState state) { |
| 973 // Check transition changes to/from the add user to session and change the | 973 // Check transition changes to/from the add user to session and change the |
| 974 // shelf alignment accordingly | 974 // shelf alignment accordingly |
| 975 bool add_user = state == SessionStateDelegate::SESSION_STATE_LOGIN_SECONDARY; | 975 const bool add_user = state == session_manager::SessionState::LOGIN_SECONDARY; |
| 976 if (add_user != state_.is_adding_user_screen) { | 976 if (add_user != state_.is_adding_user_screen) { |
| 977 state_.is_adding_user_screen = add_user; | 977 state_.is_adding_user_screen = add_user; |
| 978 UpdateShelfVisibilityAfterLoginUIChange(); | 978 UpdateShelfVisibilityAfterLoginUIChange(); |
| 979 return; | 979 return; |
| 980 } | 980 } |
| 981 TargetBounds target_bounds; | 981 TargetBounds target_bounds; |
| 982 CalculateTargetBounds(state_, &target_bounds); | 982 CalculateTargetBounds(state_, &target_bounds); |
| 983 UpdateBoundsAndOpacity(target_bounds, true /* animate */, | 983 UpdateBoundsAndOpacity(target_bounds, true /* animate */, |
| 984 true /* change_work_area */, NULL); | 984 true /* change_work_area */, NULL); |
| 985 UpdateVisibilityState(); | 985 UpdateVisibilityState(); |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1102 gesture_drag_status_ = GESTURE_DRAG_NONE; | 1102 gesture_drag_status_ = GESTURE_DRAG_NONE; |
| 1103 } | 1103 } |
| 1104 | 1104 |
| 1105 void ShelfLayoutManager::CancelGestureDrag() { | 1105 void ShelfLayoutManager::CancelGestureDrag() { |
| 1106 gesture_drag_status_ = GESTURE_DRAG_CANCEL_IN_PROGRESS; | 1106 gesture_drag_status_ = GESTURE_DRAG_CANCEL_IN_PROGRESS; |
| 1107 UpdateVisibilityState(); | 1107 UpdateVisibilityState(); |
| 1108 gesture_drag_status_ = GESTURE_DRAG_NONE; | 1108 gesture_drag_status_ = GESTURE_DRAG_NONE; |
| 1109 } | 1109 } |
| 1110 | 1110 |
| 1111 } // namespace ash | 1111 } // namespace ash |
| OLD | NEW |