| 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 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 void LockStateController::StartRealShutdownTimer(bool with_animation_time) { | 304 void LockStateController::StartRealShutdownTimer(bool with_animation_time) { |
| 305 base::TimeDelta duration = | 305 base::TimeDelta duration = |
| 306 base::TimeDelta::FromMilliseconds(kShutdownRequestDelayMs); | 306 base::TimeDelta::FromMilliseconds(kShutdownRequestDelayMs); |
| 307 if (with_animation_time) { | 307 if (with_animation_time) { |
| 308 duration += | 308 duration += |
| 309 animator_->GetDuration(SessionStateAnimator::ANIMATION_SPEED_SHUTDOWN); | 309 animator_->GetDuration(SessionStateAnimator::ANIMATION_SPEED_SHUTDOWN); |
| 310 } | 310 } |
| 311 | 311 |
| 312 #if defined(OS_CHROMEOS) | 312 #if defined(OS_CHROMEOS) |
| 313 base::TimeDelta sound_duration = | 313 base::TimeDelta sound_duration = |
| 314 WmShell::Get()->GetAccessibilityDelegate()->PlayShutdownSound(); | 314 WmShell::Get()->accessibility_delegate()->PlayShutdownSound(); |
| 315 sound_duration = | 315 sound_duration = |
| 316 std::min(sound_duration, | 316 std::min(sound_duration, |
| 317 base::TimeDelta::FromMilliseconds(kMaxShutdownSoundDurationMs)); | 317 base::TimeDelta::FromMilliseconds(kMaxShutdownSoundDurationMs)); |
| 318 duration = std::max(duration, sound_duration); | 318 duration = std::max(duration, sound_duration); |
| 319 #endif | 319 #endif |
| 320 | 320 |
| 321 real_shutdown_timer_.Start( | 321 real_shutdown_timer_.Start( |
| 322 FROM_HERE, duration, base::Bind(&LockStateController::OnRealPowerTimeout, | 322 FROM_HERE, duration, base::Bind(&LockStateController::OnRealPowerTimeout, |
| 323 base::Unretained(this))); | 323 base::Unretained(this))); |
| 324 } | 324 } |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 589 SessionStateAnimator::AnimationSequence* animation_sequence) { | 589 SessionStateAnimator::AnimationSequence* animation_sequence) { |
| 590 if (unlocked_properties_.get() && | 590 if (unlocked_properties_.get() && |
| 591 unlocked_properties_->background_is_hidden) { | 591 unlocked_properties_->background_is_hidden) { |
| 592 animation_sequence->StartAnimation(SessionStateAnimator::DESKTOP_BACKGROUND, | 592 animation_sequence->StartAnimation(SessionStateAnimator::DESKTOP_BACKGROUND, |
| 593 SessionStateAnimator::ANIMATION_FADE_OUT, | 593 SessionStateAnimator::ANIMATION_FADE_OUT, |
| 594 speed); | 594 speed); |
| 595 } | 595 } |
| 596 } | 596 } |
| 597 | 597 |
| 598 } // namespace ash | 598 } // namespace ash |
| OLD | NEW |