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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 } | 107 } |
108 bool lock_to_shutdown_timer_is_running() const { | 108 bool lock_to_shutdown_timer_is_running() const { |
109 return controller_->lock_to_shutdown_timer_.IsRunning(); | 109 return controller_->lock_to_shutdown_timer_.IsRunning(); |
110 } | 110 } |
111 bool shutdown_timer_is_running() const { | 111 bool shutdown_timer_is_running() const { |
112 return controller_->pre_shutdown_timer_.IsRunning(); | 112 return controller_->pre_shutdown_timer_.IsRunning(); |
113 } | 113 } |
114 bool real_shutdown_timer_is_running() const { | 114 bool real_shutdown_timer_is_running() const { |
115 return controller_->real_shutdown_timer_.IsRunning(); | 115 return controller_->real_shutdown_timer_.IsRunning(); |
116 } | 116 } |
117 bool is_animating_lock() const { | 117 bool is_animating_lock() const { return controller_->animating_lock_; } |
118 return controller_->animating_lock_; | |
119 } | |
120 bool is_lock_cancellable() const { | 118 bool is_lock_cancellable() const { |
121 return controller_->CanCancelLockAnimation(); | 119 return controller_->CanCancelLockAnimation(); |
122 } | 120 } |
123 | 121 |
124 void trigger_lock_fail_timeout() { | 122 void trigger_lock_fail_timeout() { |
125 controller_->OnLockFailTimeout(); | 123 controller_->OnLockFailTimeout(); |
126 controller_->lock_fail_timer_.Stop(); | 124 controller_->lock_fail_timer_.Stop(); |
127 } | 125 } |
128 void trigger_lock_to_shutdown_timeout() { | 126 void trigger_lock_to_shutdown_timeout() { |
129 controller_->OnLockToShutdownTimeout(); | 127 controller_->OnLockToShutdownTimeout(); |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 | 249 |
252 // If |request_lock_on_completion| is true, a lock request will be sent | 250 // If |request_lock_on_completion| is true, a lock request will be sent |
253 // after the pre-lock animation completes. (The pre-lock animation is | 251 // after the pre-lock animation completes. (The pre-lock animation is |
254 // also displayed in response to already-in-progress lock requests; in | 252 // also displayed in response to already-in-progress lock requests; in |
255 // these cases an additional lock request is undesirable.) | 253 // these cases an additional lock request is undesirable.) |
256 void StartImmediatePreLockAnimation(bool request_lock_on_completion); | 254 void StartImmediatePreLockAnimation(bool request_lock_on_completion); |
257 void StartCancellablePreLockAnimation(); | 255 void StartCancellablePreLockAnimation(); |
258 void CancelPreLockAnimation(); | 256 void CancelPreLockAnimation(); |
259 void StartPostLockAnimation(); | 257 void StartPostLockAnimation(); |
260 // This method calls |callback| when animation completes. | 258 // This method calls |callback| when animation completes. |
261 void StartUnlockAnimationBeforeUIDestroyed(base::Closure &callback); | 259 void StartUnlockAnimationBeforeUIDestroyed(base::Closure& callback); |
262 void StartUnlockAnimationAfterUIDestroyed(); | 260 void StartUnlockAnimationAfterUIDestroyed(); |
263 | 261 |
264 // These methods are called when corresponding animation completes. | 262 // These methods are called when corresponding animation completes. |
265 void LockAnimationCancelled(); | 263 void LockAnimationCancelled(); |
266 void PreLockAnimationFinished(bool request_lock); | 264 void PreLockAnimationFinished(bool request_lock); |
267 void PostLockAnimationFinished(); | 265 void PostLockAnimationFinished(); |
268 void UnlockAnimationAfterUIDestroyedFinished(); | 266 void UnlockAnimationAfterUIDestroyedFinished(); |
269 | 267 |
270 // Stores properties of UI that have to be temporarily modified while locking. | 268 // Stores properties of UI that have to be temporarily modified while locking. |
271 void StoreUnlockedProperties(); | 269 void StoreUnlockedProperties(); |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
332 base::Closure lock_screen_displayed_callback_; | 330 base::Closure lock_screen_displayed_callback_; |
333 | 331 |
334 base::WeakPtrFactory<LockStateController> weak_ptr_factory_; | 332 base::WeakPtrFactory<LockStateController> weak_ptr_factory_; |
335 | 333 |
336 DISALLOW_COPY_AND_ASSIGN(LockStateController); | 334 DISALLOW_COPY_AND_ASSIGN(LockStateController); |
337 }; | 335 }; |
338 | 336 |
339 } // namespace ash | 337 } // namespace ash |
340 | 338 |
341 #endif // ASH_WM_LOCK_STATE_CONTROLLER_H_ | 339 #endif // ASH_WM_LOCK_STATE_CONTROLLER_H_ |
OLD | NEW |