| 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 15 matching lines...) Expand all Loading... |
| 26 class Layer; | 26 class Layer; |
| 27 } | 27 } |
| 28 | 28 |
| 29 namespace ash { | 29 namespace ash { |
| 30 | 30 |
| 31 class ShutdownController; | 31 class ShutdownController; |
| 32 | 32 |
| 33 namespace test { | 33 namespace test { |
| 34 class LockStateControllerTest; | 34 class LockStateControllerTest; |
| 35 class LockStateControllerTestApi; | 35 class LockStateControllerTestApi; |
| 36 class PowerButtonControllerTest; | |
| 37 } | 36 } |
| 38 | 37 |
| 39 // Displays onscreen animations and locks or suspends the system in response to | 38 // Displays onscreen animations and locks or suspends the system in response to |
| 40 // the power button being pressed or released. | 39 // the power button being pressed or released. |
| 41 // Lock workflow: | 40 // Lock workflow: |
| 42 // Entry points: | 41 // Entry points: |
| 43 // * StartLockAnimation (bool shutdown after lock) - starts lock that can be | 42 // * StartLockAnimation (bool shutdown after lock) - starts lock that can be |
| 44 // cancelled. | 43 // cancelled. |
| 45 // * StartLockAnimationAndLockImmediately (bool shutdown after lock) - starts | 44 // * StartLockAnimationAndLockImmediately (bool shutdown after lock) - starts |
| 46 // uninterruptible lock animation. | 45 // uninterruptible lock animation. |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 // ShellObserver overrides: | 140 // ShellObserver overrides: |
| 142 void OnLoginStateChanged(LoginStatus status) override; | 141 void OnLoginStateChanged(LoginStatus status) override; |
| 143 void OnAppTerminating() override; | 142 void OnAppTerminating() override; |
| 144 void OnLockStateChanged(bool locked) override; | 143 void OnLockStateChanged(bool locked) override; |
| 145 | 144 |
| 146 void set_animator_for_test(SessionStateAnimator* animator) { | 145 void set_animator_for_test(SessionStateAnimator* animator) { |
| 147 animator_.reset(animator); | 146 animator_.reset(animator); |
| 148 } | 147 } |
| 149 | 148 |
| 150 private: | 149 private: |
| 151 friend class test::PowerButtonControllerTest; | |
| 152 friend class test::LockStateControllerTest; | 150 friend class test::LockStateControllerTest; |
| 153 friend class test::LockStateControllerTestApi; | 151 friend class test::LockStateControllerTestApi; |
| 154 | 152 |
| 155 struct UnlockedStateProperties { | 153 struct UnlockedStateProperties { |
| 156 bool wallpaper_is_hidden; | 154 bool wallpaper_is_hidden; |
| 157 }; | 155 }; |
| 158 | 156 |
| 159 // Reverts the pre-lock animation, reports the error. | 157 // Reverts the pre-lock animation, reports the error. |
| 160 void OnLockFailTimeout(); | 158 void OnLockFailTimeout(); |
| 161 | 159 |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 base::Closure lock_screen_displayed_callback_; | 263 base::Closure lock_screen_displayed_callback_; |
| 266 | 264 |
| 267 base::WeakPtrFactory<LockStateController> weak_ptr_factory_; | 265 base::WeakPtrFactory<LockStateController> weak_ptr_factory_; |
| 268 | 266 |
| 269 DISALLOW_COPY_AND_ASSIGN(LockStateController); | 267 DISALLOW_COPY_AND_ASSIGN(LockStateController); |
| 270 }; | 268 }; |
| 271 | 269 |
| 272 } // namespace ash | 270 } // namespace ash |
| 273 | 271 |
| 274 #endif // ASH_WM_LOCK_STATE_CONTROLLER_H_ | 272 #endif // ASH_WM_LOCK_STATE_CONTROLLER_H_ |
| OLD | NEW |