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

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

Issue 2154523002: Move AccessibilityDelegate ownership to ash::WmShell (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@setmediadelegate
Patch Set: fix mash_unittests Created 4 years, 5 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
« no previous file with comments | « ash/shell.cc ('k') | ash/wm/overview/window_selector_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #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
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
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
OLDNEW
« no previous file with comments | « ash/shell.cc ('k') | ash/wm/overview/window_selector_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698