| 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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 void OnLockScreenHide(base::Closure& callback); | 205 void OnLockScreenHide(base::Closure& callback); |
| 206 | 206 |
| 207 // Sets up the callback that should be called once lock animation is finished. | 207 // Sets up the callback that should be called once lock animation is finished. |
| 208 // Callback is guaranteed to be called once and then discarded. | 208 // Callback is guaranteed to be called once and then discarded. |
| 209 void SetLockScreenDisplayedCallback(const base::Closure& callback); | 209 void SetLockScreenDisplayedCallback(const base::Closure& callback); |
| 210 | 210 |
| 211 // aura::WindowTreeHostObserver override: | 211 // aura::WindowTreeHostObserver override: |
| 212 void OnHostCloseRequested(const aura::WindowTreeHost* host) override; | 212 void OnHostCloseRequested(const aura::WindowTreeHost* host) override; |
| 213 | 213 |
| 214 // ShellObserver overrides: | 214 // ShellObserver overrides: |
| 215 void OnLoginStateChanged(user::LoginStatus status) override; | 215 void OnLoginStateChanged(LoginStatus status) override; |
| 216 void OnAppTerminating() override; | 216 void OnAppTerminating() override; |
| 217 void OnLockStateChanged(bool locked) override; | 217 void OnLockStateChanged(bool locked) override; |
| 218 | 218 |
| 219 void set_animator_for_test(SessionStateAnimator* animator) { | 219 void set_animator_for_test(SessionStateAnimator* animator) { |
| 220 animator_.reset(animator); | 220 animator_.reset(animator); |
| 221 } | 221 } |
| 222 | 222 |
| 223 private: | 223 private: |
| 224 friend class test::PowerButtonControllerTest; | 224 friend class test::PowerButtonControllerTest; |
| 225 friend class test::LockStateControllerTest; | 225 friend class test::LockStateControllerTest; |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 ash::SessionStateAnimator::AnimationSpeed speed, | 287 ash::SessionStateAnimator::AnimationSpeed speed, |
| 288 SessionStateAnimator::AnimationSequence* animation_sequence); | 288 SessionStateAnimator::AnimationSequence* animation_sequence); |
| 289 | 289 |
| 290 std::unique_ptr<SessionStateAnimator> animator_; | 290 std::unique_ptr<SessionStateAnimator> animator_; |
| 291 | 291 |
| 292 std::unique_ptr<LockStateControllerDelegate> delegate_; | 292 std::unique_ptr<LockStateControllerDelegate> delegate_; |
| 293 | 293 |
| 294 base::ObserverList<LockStateObserver> observers_; | 294 base::ObserverList<LockStateObserver> observers_; |
| 295 | 295 |
| 296 // The current login status, or original login status from before we locked. | 296 // The current login status, or original login status from before we locked. |
| 297 user::LoginStatus login_status_; | 297 LoginStatus login_status_; |
| 298 | 298 |
| 299 // Current lock status. | 299 // Current lock status. |
| 300 bool system_is_locked_; | 300 bool system_is_locked_; |
| 301 | 301 |
| 302 // Are we in the process of shutting the machine down? | 302 // Are we in the process of shutting the machine down? |
| 303 bool shutting_down_; | 303 bool shutting_down_; |
| 304 | 304 |
| 305 // Indicates whether controller should proceed to (cancellable) shutdown after | 305 // Indicates whether controller should proceed to (cancellable) shutdown after |
| 306 // locking. | 306 // locking. |
| 307 bool shutdown_after_lock_; | 307 bool shutdown_after_lock_; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 base::Closure lock_screen_displayed_callback_; | 340 base::Closure lock_screen_displayed_callback_; |
| 341 | 341 |
| 342 base::WeakPtrFactory<LockStateController> weak_ptr_factory_; | 342 base::WeakPtrFactory<LockStateController> weak_ptr_factory_; |
| 343 | 343 |
| 344 DISALLOW_COPY_AND_ASSIGN(LockStateController); | 344 DISALLOW_COPY_AND_ASSIGN(LockStateController); |
| 345 }; | 345 }; |
| 346 | 346 |
| 347 } // namespace ash | 347 } // namespace ash |
| 348 | 348 |
| 349 #endif // ASH_WM_LOCK_STATE_CONTROLLER_H_ | 349 #endif // ASH_WM_LOCK_STATE_CONTROLLER_H_ |
| OLD | NEW |