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

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

Issue 2738133003: Promotes a handful of members from WmShell to Shell (Closed)
Patch Set: merge Created 3 years, 9 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/test/test_wallpaper_delegate.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 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « ash/test/test_wallpaper_delegate.cc ('k') | ash/wm/overview/window_selector_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698