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 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 | 203 |
204 void set_animator_for_test(SessionStateAnimator* animator) { | 204 void set_animator_for_test(SessionStateAnimator* animator) { |
205 animator_.reset(animator); | 205 animator_.reset(animator); |
206 } | 206 } |
207 | 207 |
208 private: | 208 private: |
209 friend class test::PowerButtonControllerTest; | 209 friend class test::PowerButtonControllerTest; |
210 friend class test::LockStateControllerTest; | 210 friend class test::LockStateControllerTest; |
211 | 211 |
212 struct UnlockedStateProperties { | 212 struct UnlockedStateProperties { |
213 bool background_is_hidden; | 213 bool wallpaper_is_hidden; |
214 }; | 214 }; |
215 | 215 |
216 // Reverts the pre-lock animation, reports the error. | 216 // Reverts the pre-lock animation, reports the error. |
217 void OnLockFailTimeout(); | 217 void OnLockFailTimeout(); |
218 | 218 |
219 // Starts timer for gap between lock and shutdown. | 219 // Starts timer for gap between lock and shutdown. |
220 void StartLockToShutdownTimer(); | 220 void StartLockToShutdownTimer(); |
221 | 221 |
222 // Calls StartShutdownAnimation(). | 222 // Calls StartShutdownAnimation(). |
223 void OnLockToShutdownTimeout(); | 223 void OnLockToShutdownTimeout(); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 // These methods are called when corresponding animation completes. | 255 // These methods are called when corresponding animation completes. |
256 void LockAnimationCancelled(); | 256 void LockAnimationCancelled(); |
257 void PreLockAnimationFinished(bool request_lock); | 257 void PreLockAnimationFinished(bool request_lock); |
258 void PostLockAnimationFinished(); | 258 void PostLockAnimationFinished(); |
259 void UnlockAnimationAfterUIDestroyedFinished(); | 259 void UnlockAnimationAfterUIDestroyedFinished(); |
260 | 260 |
261 // Stores properties of UI that have to be temporarily modified while locking. | 261 // Stores properties of UI that have to be temporarily modified while locking. |
262 void StoreUnlockedProperties(); | 262 void StoreUnlockedProperties(); |
263 void RestoreUnlockedProperties(); | 263 void RestoreUnlockedProperties(); |
264 | 264 |
265 // Fades in background layer with |speed| if it was hidden in unlocked state. | 265 // Fades in wallpaper layer with |speed| if it was hidden in unlocked state. |
266 void AnimateBackgroundAppearanceIfNecessary( | 266 void AnimateWallpaperAppearanceIfNecessary( |
267 ash::SessionStateAnimator::AnimationSpeed speed, | 267 ash::SessionStateAnimator::AnimationSpeed speed, |
268 SessionStateAnimator::AnimationSequence* animation_sequence); | 268 SessionStateAnimator::AnimationSequence* animation_sequence); |
269 | 269 |
270 // Fades out background layer with |speed| if it was hidden in unlocked state. | 270 // Fades out wallpaper layer with |speed| if it was hidden in unlocked state. |
271 void AnimateBackgroundHidingIfNecessary( | 271 void AnimateWallpaperHidingIfNecessary( |
272 ash::SessionStateAnimator::AnimationSpeed speed, | 272 ash::SessionStateAnimator::AnimationSpeed speed, |
273 SessionStateAnimator::AnimationSequence* animation_sequence); | 273 SessionStateAnimator::AnimationSequence* animation_sequence); |
274 | 274 |
275 std::unique_ptr<SessionStateAnimator> animator_; | 275 std::unique_ptr<SessionStateAnimator> animator_; |
276 | 276 |
277 std::unique_ptr<LockStateControllerDelegate> delegate_; | 277 std::unique_ptr<LockStateControllerDelegate> delegate_; |
278 | 278 |
279 // The current login status, or original login status from before we locked. | 279 // The current login status, or original login status from before we locked. |
280 LoginStatus login_status_; | 280 LoginStatus login_status_; |
281 | 281 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
321 base::Closure lock_screen_displayed_callback_; | 321 base::Closure lock_screen_displayed_callback_; |
322 | 322 |
323 base::WeakPtrFactory<LockStateController> weak_ptr_factory_; | 323 base::WeakPtrFactory<LockStateController> weak_ptr_factory_; |
324 | 324 |
325 DISALLOW_COPY_AND_ASSIGN(LockStateController); | 325 DISALLOW_COPY_AND_ASSIGN(LockStateController); |
326 }; | 326 }; |
327 | 327 |
328 } // namespace ash | 328 } // namespace ash |
329 | 329 |
330 #endif // ASH_WM_LOCK_STATE_CONTROLLER_H_ | 330 #endif // ASH_WM_LOCK_STATE_CONTROLLER_H_ |
OLD | NEW |