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

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

Issue 13637009: Hide cursor upon lock animation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Final attempt, with comments Created 7 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/cancel_mode.h" 8 #include "ash/cancel_mode.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/shell_delegate.h" 10 #include "ash/shell_delegate.h"
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 if (!CanCancelShutdownAnimation()) 256 if (!CanCancelShutdownAnimation())
257 return; 257 return;
258 if (lock_to_shutdown_timer_.IsRunning()) { 258 if (lock_to_shutdown_timer_.IsRunning()) {
259 lock_to_shutdown_timer_.Stop(); 259 lock_to_shutdown_timer_.Stop();
260 return; 260 return;
261 } 261 }
262 if (shutdown_after_lock_) { 262 if (shutdown_after_lock_) {
263 shutdown_after_lock_ = false; 263 shutdown_after_lock_ = false;
264 return; 264 return;
265 } 265 }
266
267 //ash::Shell::GetInstance()->cursor_manager()->ShowCursor();
Daniel Erat 2013/04/08 18:39:49 what did you plan to do with this? i agree that t
Denis Kuznetsov (DE-MUC) 2013/04/08 18:44:49 Sorry, that was the part of experiment and was not
Daniel Erat 2013/04/08 19:28:18 I meant that the cursor should maybe be shown even
268
266 animator_->StartGlobalAnimation( 269 animator_->StartGlobalAnimation(
267 internal::SessionStateAnimator::ANIMATION_UNDO_GRAYSCALE_BRIGHTNESS, 270 internal::SessionStateAnimator::ANIMATION_UNDO_GRAYSCALE_BRIGHTNESS,
268 internal::SessionStateAnimator::ANIMATION_SPEED_REVERT_SHUTDOWN); 271 internal::SessionStateAnimator::ANIMATION_SPEED_REVERT_SHUTDOWN);
269 pre_shutdown_timer_.Stop(); 272 pre_shutdown_timer_.Stop();
270 } 273 }
271 274
272 void SessionStateControllerImpl2::RequestShutdown() { 275 void SessionStateControllerImpl2::RequestShutdown() {
273 if (!shutting_down_) 276 if (!shutting_down_)
274 RequestShutdownImpl(); 277 RequestShutdownImpl();
275 } 278 }
(...skipping 28 matching lines...) Expand all
304 base::TimeDelta::FromMilliseconds(kLockToShutdownTimeoutMs), 307 base::TimeDelta::FromMilliseconds(kLockToShutdownTimeoutMs),
305 this, &SessionStateControllerImpl2::OnLockToShutdownTimeout); 308 this, &SessionStateControllerImpl2::OnLockToShutdownTimeout);
306 } 309 }
307 310
308 void SessionStateControllerImpl2::OnLockToShutdownTimeout() { 311 void SessionStateControllerImpl2::OnLockToShutdownTimeout() {
309 DCHECK(system_is_locked_); 312 DCHECK(system_is_locked_);
310 StartCancellableShutdownAnimation(); 313 StartCancellableShutdownAnimation();
311 } 314 }
312 315
313 void SessionStateControllerImpl2::StartCancellableShutdownAnimation() { 316 void SessionStateControllerImpl2::StartCancellableShutdownAnimation() {
317 Shell* shell = ash::Shell::GetInstance();
318 // Hide cursor, but let it reappear if the mouse moves.
319 shell->env_filter()->set_cursor_hidden_by_filter(true);
320 shell->cursor_manager()->HideCursor();
321
314 animator_->StartGlobalAnimation( 322 animator_->StartGlobalAnimation(
315 internal::SessionStateAnimator::ANIMATION_GRAYSCALE_BRIGHTNESS, 323 internal::SessionStateAnimator::ANIMATION_GRAYSCALE_BRIGHTNESS,
316 internal::SessionStateAnimator::ANIMATION_SPEED_SHUTDOWN); 324 internal::SessionStateAnimator::ANIMATION_SPEED_SHUTDOWN);
317 StartPreShutdownAnimationTimer(); 325 StartPreShutdownAnimationTimer();
318 } 326 }
319 327
320 void SessionStateControllerImpl2::StartShutdownAnimationImpl() { 328 void SessionStateControllerImpl2::StartShutdownAnimationImpl() {
321 animator_->StartGlobalAnimation( 329 animator_->StartGlobalAnimation(
322 internal::SessionStateAnimator::ANIMATION_GRAYSCALE_BRIGHTNESS, 330 internal::SessionStateAnimator::ANIMATION_GRAYSCALE_BRIGHTNESS,
323 internal::SessionStateAnimator::ANIMATION_SPEED_SHUTDOWN); 331 internal::SessionStateAnimator::ANIMATION_SPEED_SHUTDOWN);
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 unlocked_properties_->background_is_hidden) { 637 unlocked_properties_->background_is_hidden) {
630 animator_->StartAnimationWithObserver( 638 animator_->StartAnimationWithObserver(
631 internal::SessionStateAnimator::DESKTOP_BACKGROUND, 639 internal::SessionStateAnimator::DESKTOP_BACKGROUND,
632 internal::SessionStateAnimator::ANIMATION_FADE_OUT, 640 internal::SessionStateAnimator::ANIMATION_FADE_OUT,
633 speed, 641 speed,
634 observer); 642 observer);
635 } 643 }
636 } 644 }
637 645
638 } // namespace ash 646 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698