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 21 matching lines...) Expand all Loading... |
32 | 32 |
33 namespace ash { | 33 namespace ash { |
34 | 34 |
35 namespace mojom { | 35 namespace mojom { |
36 class ShutdownClient; | 36 class ShutdownClient; |
37 } | 37 } |
38 | 38 |
39 namespace test { | 39 namespace test { |
40 class LockStateControllerTest; | 40 class LockStateControllerTest; |
41 class LockStateControllerTestApi; | 41 class LockStateControllerTestApi; |
| 42 class PowerButtonControllerTest; |
42 } | 43 } |
43 | 44 |
44 // Displays onscreen animations and locks or suspends the system in response to | 45 // Displays onscreen animations and locks or suspends the system in response to |
45 // the power button being pressed or released. | 46 // the power button being pressed or released. |
46 // Lock workflow: | 47 // Lock workflow: |
47 // Entry points: | 48 // Entry points: |
48 // * StartLockAnimation (bool shutdown after lock) - starts lock that can be | 49 // * StartLockAnimation (bool shutdown after lock) - starts lock that can be |
49 // cancelled. | 50 // cancelled. |
50 // * StartLockAnimationAndLockImmediately (bool shutdown after lock) - starts | 51 // * StartLockAnimationAndLockImmediately (bool shutdown after lock) - starts |
51 // uninterruptible lock animation. | 52 // uninterruptible lock animation. |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 // ShellObserver overrides: | 147 // ShellObserver overrides: |
147 void OnLoginStateChanged(LoginStatus status) override; | 148 void OnLoginStateChanged(LoginStatus status) override; |
148 void OnAppTerminating() override; | 149 void OnAppTerminating() override; |
149 void OnLockStateChanged(bool locked) override; | 150 void OnLockStateChanged(bool locked) override; |
150 | 151 |
151 void set_animator_for_test(SessionStateAnimator* animator) { | 152 void set_animator_for_test(SessionStateAnimator* animator) { |
152 animator_.reset(animator); | 153 animator_.reset(animator); |
153 } | 154 } |
154 | 155 |
155 private: | 156 private: |
| 157 friend class test::PowerButtonControllerTest; |
156 friend class test::LockStateControllerTest; | 158 friend class test::LockStateControllerTest; |
157 friend class test::LockStateControllerTestApi; | 159 friend class test::LockStateControllerTestApi; |
158 | 160 |
159 struct UnlockedStateProperties { | 161 struct UnlockedStateProperties { |
160 bool wallpaper_is_hidden; | 162 bool wallpaper_is_hidden; |
161 }; | 163 }; |
162 | 164 |
163 // Reverts the pre-lock animation, reports the error. | 165 // Reverts the pre-lock animation, reports the error. |
164 void OnLockFailTimeout(); | 166 void OnLockFailTimeout(); |
165 | 167 |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 base::Closure lock_screen_displayed_callback_; | 271 base::Closure lock_screen_displayed_callback_; |
270 | 272 |
271 base::WeakPtrFactory<LockStateController> weak_ptr_factory_; | 273 base::WeakPtrFactory<LockStateController> weak_ptr_factory_; |
272 | 274 |
273 DISALLOW_COPY_AND_ASSIGN(LockStateController); | 275 DISALLOW_COPY_AND_ASSIGN(LockStateController); |
274 }; | 276 }; |
275 | 277 |
276 } // namespace ash | 278 } // namespace ash |
277 | 279 |
278 #endif // ASH_WM_LOCK_STATE_CONTROLLER_H_ | 280 #endif // ASH_WM_LOCK_STATE_CONTROLLER_H_ |
OLD | NEW |