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