| 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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 return; | 154 return; |
| 155 StartImmediatePreLockAnimation(false /* request_lock_on_completion */); | 155 StartImmediatePreLockAnimation(false /* request_lock_on_completion */); |
| 156 } | 156 } |
| 157 | 157 |
| 158 void LockStateController::RequestShutdown() { | 158 void LockStateController::RequestShutdown() { |
| 159 if (shutting_down_) | 159 if (shutting_down_) |
| 160 return; | 160 return; |
| 161 | 161 |
| 162 shutting_down_ = true; | 162 shutting_down_ = true; |
| 163 | 163 |
| 164 Shell* shell = Shell::Get(); | 164 ShellPort* port = ShellPort::Get(); |
| 165 // TODO(derat): Remove these null checks once mash instantiates a | 165 port->HideCursor(); |
| 166 // CursorManager. | 166 port->LockCursor(); |
| 167 if (shell->cursor_manager()) { | |
| 168 shell->cursor_manager()->HideCursor(); | |
| 169 shell->cursor_manager()->LockCursor(); | |
| 170 } | |
| 171 | 167 |
| 172 animator_->StartAnimation( | 168 animator_->StartAnimation( |
| 173 SessionStateAnimator::ROOT_CONTAINER, | 169 SessionStateAnimator::ROOT_CONTAINER, |
| 174 SessionStateAnimator::ANIMATION_GRAYSCALE_BRIGHTNESS, | 170 SessionStateAnimator::ANIMATION_GRAYSCALE_BRIGHTNESS, |
| 175 SessionStateAnimator::ANIMATION_SPEED_SHUTDOWN); | 171 SessionStateAnimator::ANIMATION_SPEED_SHUTDOWN); |
| 176 StartRealShutdownTimer(true); | 172 StartRealShutdownTimer(true); |
| 177 } | 173 } |
| 178 | 174 |
| 179 void LockStateController::OnLockScreenHide(base::OnceClosure callback) { | 175 void LockStateController::OnLockScreenHide(base::OnceClosure callback) { |
| 180 StartUnlockAnimationBeforeUIDestroyed(std::move(callback)); | 176 StartUnlockAnimationBeforeUIDestroyed(std::move(callback)); |
| (...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 552 SessionStateAnimator::AnimationSpeed speed, | 548 SessionStateAnimator::AnimationSpeed speed, |
| 553 SessionStateAnimator::AnimationSequence* animation_sequence) { | 549 SessionStateAnimator::AnimationSequence* animation_sequence) { |
| 554 if (unlocked_properties_.get() && unlocked_properties_->wallpaper_is_hidden) { | 550 if (unlocked_properties_.get() && unlocked_properties_->wallpaper_is_hidden) { |
| 555 animation_sequence->StartAnimation(SessionStateAnimator::WALLPAPER, | 551 animation_sequence->StartAnimation(SessionStateAnimator::WALLPAPER, |
| 556 SessionStateAnimator::ANIMATION_FADE_OUT, | 552 SessionStateAnimator::ANIMATION_FADE_OUT, |
| 557 speed); | 553 speed); |
| 558 } | 554 } |
| 559 } | 555 } |
| 560 | 556 |
| 561 } // namespace ash | 557 } // namespace ash |
| OLD | NEW |