| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef ASH_WM_LOCK_STATE_CONTROLLER_H_ | 5 #ifndef ASH_WM_LOCK_STATE_CONTROLLER_H_ |
| 6 #define ASH_WM_LOCK_STATE_CONTROLLER_H_ | 6 #define ASH_WM_LOCK_STATE_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 void OnLockScreenHide(base::Closure& callback); | 115 void OnLockScreenHide(base::Closure& callback); |
| 116 | 116 |
| 117 // Sets up the callback that should be called once lock animation is finished. | 117 // Sets up the callback that should be called once lock animation is finished. |
| 118 // Callback is guaranteed to be called once and then discarded. | 118 // Callback is guaranteed to be called once and then discarded. |
| 119 void SetLockScreenDisplayedCallback(const base::Closure& callback); | 119 void SetLockScreenDisplayedCallback(const base::Closure& callback); |
| 120 | 120 |
| 121 // aura::WindowTreeHostObserver override: | 121 // aura::WindowTreeHostObserver override: |
| 122 void OnHostCloseRequested(const aura::WindowTreeHost* host) override; | 122 void OnHostCloseRequested(const aura::WindowTreeHost* host) override; |
| 123 | 123 |
| 124 // ShellObserver overrides: | 124 // ShellObserver overrides: |
| 125 void OnLoginStateChanged(LoginStatus status) override; | |
| 126 void OnAppTerminating() override; | 125 void OnAppTerminating() override; |
| 127 void OnLockStateChanged(bool locked) override; | 126 void OnLockStateChanged(bool locked) override; |
| 128 | 127 |
| 129 void set_animator_for_test(SessionStateAnimator* animator) { | 128 void set_animator_for_test(SessionStateAnimator* animator) { |
| 130 animator_.reset(animator); | 129 animator_.reset(animator); |
| 131 } | 130 } |
| 132 | 131 |
| 133 private: | 132 private: |
| 134 friend class test::LockStateControllerTest; | 133 friend class test::LockStateControllerTest; |
| 135 friend class test::LockStateControllerTestApi; | 134 friend class test::LockStateControllerTestApi; |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 ash::SessionStateAnimator::AnimationSpeed speed, | 191 ash::SessionStateAnimator::AnimationSpeed speed, |
| 193 SessionStateAnimator::AnimationSequence* animation_sequence); | 192 SessionStateAnimator::AnimationSequence* animation_sequence); |
| 194 | 193 |
| 195 // Fades out wallpaper layer with |speed| if it was hidden in unlocked state. | 194 // Fades out wallpaper layer with |speed| if it was hidden in unlocked state. |
| 196 void AnimateWallpaperHidingIfNecessary( | 195 void AnimateWallpaperHidingIfNecessary( |
| 197 ash::SessionStateAnimator::AnimationSpeed speed, | 196 ash::SessionStateAnimator::AnimationSpeed speed, |
| 198 SessionStateAnimator::AnimationSequence* animation_sequence); | 197 SessionStateAnimator::AnimationSequence* animation_sequence); |
| 199 | 198 |
| 200 std::unique_ptr<SessionStateAnimator> animator_; | 199 std::unique_ptr<SessionStateAnimator> animator_; |
| 201 | 200 |
| 202 // The current login status, or original login status from before we locked. | |
| 203 LoginStatus login_status_; | |
| 204 | |
| 205 // Current lock status. | 201 // Current lock status. |
| 206 bool system_is_locked_; | 202 bool system_is_locked_; |
| 207 | 203 |
| 208 // Are we in the process of shutting the machine down? | 204 // Are we in the process of shutting the machine down? |
| 209 bool shutting_down_; | 205 bool shutting_down_; |
| 210 | 206 |
| 211 // Indicates whether controller should proceed to (cancellable) shutdown after | 207 // Indicates whether controller should proceed to (cancellable) shutdown after |
| 212 // locking. | 208 // locking. |
| 213 bool shutdown_after_lock_; | 209 bool shutdown_after_lock_; |
| 214 | 210 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 base::Closure lock_screen_displayed_callback_; | 243 base::Closure lock_screen_displayed_callback_; |
| 248 | 244 |
| 249 base::WeakPtrFactory<LockStateController> weak_ptr_factory_; | 245 base::WeakPtrFactory<LockStateController> weak_ptr_factory_; |
| 250 | 246 |
| 251 DISALLOW_COPY_AND_ASSIGN(LockStateController); | 247 DISALLOW_COPY_AND_ASSIGN(LockStateController); |
| 252 }; | 248 }; |
| 253 | 249 |
| 254 } // namespace ash | 250 } // namespace ash |
| 255 | 251 |
| 256 #endif // ASH_WM_LOCK_STATE_CONTROLLER_H_ | 252 #endif // ASH_WM_LOCK_STATE_CONTROLLER_H_ |
| OLD | NEW |