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_impl2.h" | 5 #include "ash/wm/session_state_controller_impl2.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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 if (lock_to_shutdown_timer_.IsRunning()) { | 257 if (lock_to_shutdown_timer_.IsRunning()) { |
258 lock_to_shutdown_timer_.Stop(); | 258 lock_to_shutdown_timer_.Stop(); |
259 return; | 259 return; |
260 } | 260 } |
261 if (shutdown_after_lock_) { | 261 if (shutdown_after_lock_) { |
262 shutdown_after_lock_ = false; | 262 shutdown_after_lock_ = false; |
263 return; | 263 return; |
264 } | 264 } |
265 animator_->StartGlobalAnimation( | 265 animator_->StartGlobalAnimation( |
266 internal::SessionStateAnimator::ANIMATION_UNDO_GRAYSCALE_BRIGHTNESS, | 266 internal::SessionStateAnimator::ANIMATION_UNDO_GRAYSCALE_BRIGHTNESS, |
267 internal::SessionStateAnimator::ANIMATION_SPEED_REVERT); | 267 internal::SessionStateAnimator::ANIMATION_SPEED_REVERT_SHUTDOWN); |
268 pre_shutdown_timer_.Stop(); | 268 pre_shutdown_timer_.Stop(); |
269 } | 269 } |
270 | 270 |
271 void SessionStateControllerImpl2::RequestShutdown() { | 271 void SessionStateControllerImpl2::RequestShutdown() { |
272 if (!shutting_down_) | 272 if (!shutting_down_) |
273 RequestShutdownImpl(); | 273 RequestShutdownImpl(); |
274 } | 274 } |
275 | 275 |
276 void SessionStateControllerImpl2::RequestShutdownImpl() { | 276 void SessionStateControllerImpl2::RequestShutdownImpl() { |
277 DCHECK(!shutting_down_); | 277 DCHECK(!shutting_down_); |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
493 base::Bind(&SessionStateControllerImpl2::LockAnimationCancelled, | 493 base::Bind(&SessionStateControllerImpl2::LockAnimationCancelled, |
494 base::Unretained(this)); | 494 base::Unretained(this)); |
495 AnimationFinishedObserver* observer = | 495 AnimationFinishedObserver* observer = |
496 new AnimationFinishedObserver(next_animation_starter); | 496 new AnimationFinishedObserver(next_animation_starter); |
497 | 497 |
498 observer->Pause(); | 498 observer->Pause(); |
499 | 499 |
500 animator_->StartAnimationWithObserver( | 500 animator_->StartAnimationWithObserver( |
501 internal::SessionStateAnimator::NON_LOCK_SCREEN_CONTAINERS, | 501 internal::SessionStateAnimator::NON_LOCK_SCREEN_CONTAINERS, |
502 internal::SessionStateAnimator::ANIMATION_UNDO_LIFT, | 502 internal::SessionStateAnimator::ANIMATION_UNDO_LIFT, |
503 internal::SessionStateAnimator::ANIMATION_SPEED_MOVE_WINDOWS, | 503 internal::SessionStateAnimator::ANIMATION_SPEED_UNDO_MOVE_WINDOWS, |
504 observer); | 504 observer); |
505 animator_->StartAnimationWithObserver( | 505 animator_->StartAnimationWithObserver( |
506 internal::SessionStateAnimator::LAUNCHER, | 506 internal::SessionStateAnimator::LAUNCHER, |
507 internal::SessionStateAnimator::ANIMATION_FADE_IN, | 507 internal::SessionStateAnimator::ANIMATION_FADE_IN, |
508 internal::SessionStateAnimator::ANIMATION_SPEED_MOVE_WINDOWS, | 508 internal::SessionStateAnimator::ANIMATION_SPEED_UNDO_MOVE_WINDOWS, |
509 observer); | 509 observer); |
510 AnimateBackgroundHidingIfNecessary( | 510 AnimateBackgroundHidingIfNecessary( |
511 internal::SessionStateAnimator::ANIMATION_SPEED_MOVE_WINDOWS, | 511 internal::SessionStateAnimator::ANIMATION_SPEED_UNDO_MOVE_WINDOWS, |
512 observer); | 512 observer); |
513 | 513 |
514 observer->Unpause(); | 514 observer->Unpause(); |
515 } | 515 } |
516 | 516 |
517 void SessionStateControllerImpl2::StartPostLockAnimation() { | 517 void SessionStateControllerImpl2::StartPostLockAnimation() { |
518 base::Closure next_animation_starter = | 518 base::Closure next_animation_starter = |
519 base::Bind(&SessionStateControllerImpl2::PostLockAnimationFinished, | 519 base::Bind(&SessionStateControllerImpl2::PostLockAnimationFinished, |
520 base::Unretained(this)); | 520 base::Unretained(this)); |
521 | 521 |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
616 unlocked_properties_->background_is_hidden) { | 616 unlocked_properties_->background_is_hidden) { |
617 animator_->StartAnimationWithObserver( | 617 animator_->StartAnimationWithObserver( |
618 internal::SessionStateAnimator::DESKTOP_BACKGROUND, | 618 internal::SessionStateAnimator::DESKTOP_BACKGROUND, |
619 internal::SessionStateAnimator::ANIMATION_FADE_OUT, | 619 internal::SessionStateAnimator::ANIMATION_FADE_OUT, |
620 speed, | 620 speed, |
621 observer); | 621 observer); |
622 } | 622 } |
623 } | 623 } |
624 | 624 |
625 } // namespace ash | 625 } // namespace ash |
OLD | NEW |