Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(247)

Side by Side Diff: ash/wm/lock_state_controller.cc

Issue 326813004: Added quick lock mechanism while in Touchview (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changed kAshEnablePowerQuickLock to kAshEnablePowerButtonQuickLock. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #include "ash/wm/lock_state_controller.h" 5 #include "ash/wm/lock_state_controller.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ash/accessibility_delegate.h" 9 #include "ash/accessibility_delegate.h"
10 #include "ash/ash_switches.h" 10 #include "ash/ash_switches.h"
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 shutdown_after_lock_ = shutdown_after_lock; 202 shutdown_after_lock_ = shutdown_after_lock;
203 can_cancel_lock_animation_ = true; 203 can_cancel_lock_animation_ = true;
204 204
205 StartCancellablePreLockAnimation(); 205 StartCancellablePreLockAnimation();
206 } 206 }
207 207
208 void LockStateController::StartShutdownAnimation() { 208 void LockStateController::StartShutdownAnimation() {
209 StartCancellableShutdownAnimation(); 209 StartCancellableShutdownAnimation();
210 } 210 }
211 211
212 void LockStateController::StartLockAnimationAndLockImmediately() { 212 void LockStateController::StartLockAnimationAndLockImmediately(
213 bool shutdown_after_lock) {
213 if (animating_lock_) 214 if (animating_lock_)
214 return; 215 return;
216 shutdown_after_lock_ = shutdown_after_lock;
215 StartImmediatePreLockAnimation(true /* request_lock_on_completion */); 217 StartImmediatePreLockAnimation(true /* request_lock_on_completion */);
216 } 218 }
217 219
218 bool LockStateController::LockRequested() { 220 bool LockStateController::LockRequested() {
219 return lock_fail_timer_.IsRunning(); 221 return lock_fail_timer_.IsRunning();
220 } 222 }
221 223
222 bool LockStateController::ShutdownRequested() { 224 bool LockStateController::ShutdownRequested() {
223 return shutting_down_; 225 return shutting_down_;
224 } 226 }
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
686 unlocked_properties_->background_is_hidden) { 688 unlocked_properties_->background_is_hidden) {
687 animator_->StartAnimationWithObserver( 689 animator_->StartAnimationWithObserver(
688 SessionStateAnimator::DESKTOP_BACKGROUND, 690 SessionStateAnimator::DESKTOP_BACKGROUND,
689 SessionStateAnimator::ANIMATION_FADE_OUT, 691 SessionStateAnimator::ANIMATION_FADE_OUT,
690 speed, 692 speed,
691 observer); 693 observer);
692 } 694 }
693 } 695 }
694 696
695 } // namespace ash 697 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698