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_impl.h" | 5 #include "ash/wm/session_state_controller_impl.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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 system_is_locked_ = (status == user::LOGGED_IN_LOCKED); | 45 system_is_locked_ = (status == user::LOGGED_IN_LOCKED); |
46 } | 46 } |
47 | 47 |
48 void SessionStateControllerImpl::OnAppTerminating() { | 48 void SessionStateControllerImpl::OnAppTerminating() { |
49 // If we hear that Chrome is exiting but didn't request it ourselves, all we | 49 // If we hear that Chrome is exiting but didn't request it ourselves, all we |
50 // can really hope for is that we'll have time to clear the screen. | 50 // can really hope for is that we'll have time to clear the screen. |
51 if (!shutting_down_) { | 51 if (!shutting_down_) { |
52 shutting_down_ = true; | 52 shutting_down_ = true; |
53 Shell* shell = ash::Shell::GetInstance(); | 53 Shell* shell = ash::Shell::GetInstance(); |
54 shell->env_filter()->set_cursor_hidden_by_filter(false); | 54 shell->env_filter()->set_cursor_hidden_by_filter(false); |
55 shell->cursor_manager()->ShowCursor(false); | 55 shell->cursor_manager()->EnableCursor(false); |
56 animator_->StartAnimation( | 56 animator_->StartAnimation( |
57 internal::SessionStateAnimator::kAllContainersMask, | 57 internal::SessionStateAnimator::kAllContainersMask, |
58 internal::SessionStateAnimator::ANIMATION_HIDE_IMMEDIATELY, | 58 internal::SessionStateAnimator::ANIMATION_HIDE_IMMEDIATELY, |
59 internal::SessionStateAnimator::ANIMATION_SPEED_IMMEDIATE); | 59 internal::SessionStateAnimator::ANIMATION_SPEED_IMMEDIATE); |
60 } | 60 } |
61 } | 61 } |
62 | 62 |
63 void SessionStateControllerImpl::OnLockStateChanged(bool locked) { | 63 void SessionStateControllerImpl::OnLockStateChanged(bool locked) { |
64 if (shutting_down_ || (system_is_locked_ == locked)) | 64 if (shutting_down_ || (system_is_locked_ == locked)) |
65 return; | 65 return; |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 if (!shutting_down_) | 212 if (!shutting_down_) |
213 RequestShutdownImpl(); | 213 RequestShutdownImpl(); |
214 } | 214 } |
215 | 215 |
216 void SessionStateControllerImpl::RequestShutdownImpl() { | 216 void SessionStateControllerImpl::RequestShutdownImpl() { |
217 DCHECK(!shutting_down_); | 217 DCHECK(!shutting_down_); |
218 shutting_down_ = true; | 218 shutting_down_ = true; |
219 | 219 |
220 Shell* shell = ash::Shell::GetInstance(); | 220 Shell* shell = ash::Shell::GetInstance(); |
221 shell->env_filter()->set_cursor_hidden_by_filter(false); | 221 shell->env_filter()->set_cursor_hidden_by_filter(false); |
222 shell->cursor_manager()->ShowCursor(false); | 222 shell->cursor_manager()->EnableCursor(false); |
223 | 223 |
224 if (login_status_ != user::LOGGED_IN_NONE) { | 224 if (login_status_ != user::LOGGED_IN_NONE) { |
225 // Hide the other containers before starting the animation. | 225 // Hide the other containers before starting the animation. |
226 // ANIMATION_FULL_CLOSE will make the screen locker windows partially | 226 // ANIMATION_FULL_CLOSE will make the screen locker windows partially |
227 // transparent, and we don't want the other windows to show through. | 227 // transparent, and we don't want the other windows to show through. |
228 animator_->StartAnimation( | 228 animator_->StartAnimation( |
229 internal::SessionStateAnimator::NON_LOCK_SCREEN_CONTAINERS | | 229 internal::SessionStateAnimator::NON_LOCK_SCREEN_CONTAINERS | |
230 internal::SessionStateAnimator::LAUNCHER, | 230 internal::SessionStateAnimator::LAUNCHER, |
231 internal::SessionStateAnimator::ANIMATION_HIDE_IMMEDIATELY, | 231 internal::SessionStateAnimator::ANIMATION_HIDE_IMMEDIATELY, |
232 internal::SessionStateAnimator::ANIMATION_SPEED_IMMEDIATE); | 232 internal::SessionStateAnimator::ANIMATION_SPEED_IMMEDIATE); |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
332 void SessionStateControllerImpl::OnLockScreenHide(base::Closure& callback) { | 332 void SessionStateControllerImpl::OnLockScreenHide(base::Closure& callback) { |
333 callback.Run(); | 333 callback.Run(); |
334 } | 334 } |
335 | 335 |
336 void SessionStateControllerImpl::SetLockScreenDisplayedCallback( | 336 void SessionStateControllerImpl::SetLockScreenDisplayedCallback( |
337 base::Closure& callback) { | 337 base::Closure& callback) { |
338 NOTIMPLEMENTED(); | 338 NOTIMPLEMENTED(); |
339 } | 339 } |
340 | 340 |
341 } // namespace ash | 341 } // namespace ash |
OLD | NEW |