| 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 #include "ash/wm/lock_state_controller.h" | 5 #include "ash/wm/lock_state_controller.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 | 285 |
| 286 void LockStateController::StartRealShutdownTimer(bool with_animation_time) { | 286 void LockStateController::StartRealShutdownTimer(bool with_animation_time) { |
| 287 base::TimeDelta duration = | 287 base::TimeDelta duration = |
| 288 base::TimeDelta::FromMilliseconds(kShutdownRequestDelayMs); | 288 base::TimeDelta::FromMilliseconds(kShutdownRequestDelayMs); |
| 289 if (with_animation_time) { | 289 if (with_animation_time) { |
| 290 duration += | 290 duration += |
| 291 animator_->GetDuration(SessionStateAnimator::ANIMATION_SPEED_SHUTDOWN); | 291 animator_->GetDuration(SessionStateAnimator::ANIMATION_SPEED_SHUTDOWN); |
| 292 } | 292 } |
| 293 | 293 |
| 294 base::TimeDelta sound_duration = | 294 base::TimeDelta sound_duration = |
| 295 WmShell::Get()->accessibility_delegate()->PlayShutdownSound(); | 295 Shell::GetInstance()->accessibility_delegate()->PlayShutdownSound(); |
| 296 sound_duration = | 296 sound_duration = |
| 297 std::min(sound_duration, | 297 std::min(sound_duration, |
| 298 base::TimeDelta::FromMilliseconds(kMaxShutdownSoundDurationMs)); | 298 base::TimeDelta::FromMilliseconds(kMaxShutdownSoundDurationMs)); |
| 299 duration = std::max(duration, sound_duration); | 299 duration = std::max(duration, sound_duration); |
| 300 | 300 |
| 301 real_shutdown_timer_.Start( | 301 real_shutdown_timer_.Start( |
| 302 FROM_HERE, duration, base::Bind(&LockStateController::OnRealPowerTimeout, | 302 FROM_HERE, duration, base::Bind(&LockStateController::OnRealPowerTimeout, |
| 303 base::Unretained(this))); | 303 base::Unretained(this))); |
| 304 } | 304 } |
| 305 | 305 |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 559 SessionStateAnimator::AnimationSpeed speed, | 559 SessionStateAnimator::AnimationSpeed speed, |
| 560 SessionStateAnimator::AnimationSequence* animation_sequence) { | 560 SessionStateAnimator::AnimationSequence* animation_sequence) { |
| 561 if (unlocked_properties_.get() && unlocked_properties_->wallpaper_is_hidden) { | 561 if (unlocked_properties_.get() && unlocked_properties_->wallpaper_is_hidden) { |
| 562 animation_sequence->StartAnimation(SessionStateAnimator::WALLPAPER, | 562 animation_sequence->StartAnimation(SessionStateAnimator::WALLPAPER, |
| 563 SessionStateAnimator::ANIMATION_FADE_OUT, | 563 SessionStateAnimator::ANIMATION_FADE_OUT, |
| 564 speed); | 564 speed); |
| 565 } | 565 } |
| 566 } | 566 } |
| 567 | 567 |
| 568 } // namespace ash | 568 } // namespace ash |
| OLD | NEW |