| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/session_state_controller.h" | 5 #include "ash/wm/session_state_controller.h" |
| 6 | 6 |
| 7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
| 8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
| 9 #include "ash/shell_delegate.h" | 9 #include "ash/shell_delegate.h" |
| 10 #include "ash/shell_window_ids.h" | 10 #include "ash/shell_window_ids.h" |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 } | 130 } |
| 131 | 131 |
| 132 void SessionStateController::StartLockAnimationAndLockImmediately() { | 132 void SessionStateController::StartLockAnimationAndLockImmediately() { |
| 133 animator_->ShowBlackLayer(); | 133 animator_->ShowBlackLayer(); |
| 134 animator_->StartAnimation( | 134 animator_->StartAnimation( |
| 135 internal::SessionStateAnimator::NON_LOCK_SCREEN_CONTAINERS, | 135 internal::SessionStateAnimator::NON_LOCK_SCREEN_CONTAINERS, |
| 136 internal::SessionStateAnimator::ANIMATION_SLOW_CLOSE); | 136 internal::SessionStateAnimator::ANIMATION_SLOW_CLOSE); |
| 137 OnLockTimeout(); | 137 OnLockTimeout(); |
| 138 } | 138 } |
| 139 | 139 |
| 140 void SessionStateController::StartLockAnimation() { | 140 void SessionStateController::StartLockAnimation(bool shutdown_after_lock) { |
| 141 shutdown_after_lock_ = true; | 141 shutdown_after_lock_ = shutdown_after_lock; |
| 142 | 142 |
| 143 animator_->ShowBlackLayer(); | 143 animator_->ShowBlackLayer(); |
| 144 animator_->StartAnimation( | 144 animator_->StartAnimation( |
| 145 internal::SessionStateAnimator::NON_LOCK_SCREEN_CONTAINERS, | 145 internal::SessionStateAnimator::NON_LOCK_SCREEN_CONTAINERS, |
| 146 internal::SessionStateAnimator::ANIMATION_SLOW_CLOSE); | 146 internal::SessionStateAnimator::ANIMATION_SLOW_CLOSE); |
| 147 StartLockTimer(); | 147 StartLockTimer(); |
| 148 } | 148 } |
| 149 | 149 |
| 150 void SessionStateController::StartShutdownAnimation() { | 150 void SessionStateController::StartShutdownAnimation() { |
| 151 animator_->ShowBlackLayer(); | 151 animator_->ShowBlackLayer(); |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 if (delegate) { | 350 if (delegate) { |
| 351 delegate->Exit(); | 351 delegate->Exit(); |
| 352 return; | 352 return; |
| 353 } | 353 } |
| 354 } | 354 } |
| 355 #endif | 355 #endif |
| 356 delegate_->RequestShutdown(); | 356 delegate_->RequestShutdown(); |
| 357 } | 357 } |
| 358 | 358 |
| 359 } // namespace ash | 359 } // namespace ash |
| OLD | NEW |