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

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

Issue 11412315: Make the cursor have separate mode for disabled mouse events and invisible. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments Created 8 years 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
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/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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 system_is_locked_ = (status == user::LOGGED_IN_LOCKED); 47 system_is_locked_ = (status == user::LOGGED_IN_LOCKED);
48 } 48 }
49 49
50 void SessionStateControllerImpl2::OnAppTerminating() { 50 void SessionStateControllerImpl2::OnAppTerminating() {
51 // If we hear that Chrome is exiting but didn't request it ourselves, all we 51 // If we hear that Chrome is exiting but didn't request it ourselves, all we
52 // can really hope for is that we'll have time to clear the screen. 52 // can really hope for is that we'll have time to clear the screen.
53 if (!shutting_down_) { 53 if (!shutting_down_) {
54 shutting_down_ = true; 54 shutting_down_ = true;
55 Shell* shell = ash::Shell::GetInstance(); 55 Shell* shell = ash::Shell::GetInstance();
56 shell->env_filter()->set_cursor_hidden_by_filter(false); 56 shell->env_filter()->set_cursor_hidden_by_filter(false);
57 shell->cursor_manager()->ShowCursor(false); 57 shell->cursor_manager()->EnableCursor(false);
58 animator_->StartAnimation( 58 animator_->StartAnimation(
59 internal::SessionStateAnimator::kAllContainersMask, 59 internal::SessionStateAnimator::kAllContainersMask,
60 internal::SessionStateAnimator::ANIMATION_HIDE_IMMEDIATELY, 60 internal::SessionStateAnimator::ANIMATION_HIDE_IMMEDIATELY,
61 internal::SessionStateAnimator::ANIMATION_SPEED_IMMEDIATE); 61 internal::SessionStateAnimator::ANIMATION_SPEED_IMMEDIATE);
62 } 62 }
63 } 63 }
64 64
65 void SessionStateControllerImpl2::OnLockStateChanged(bool locked) { 65 void SessionStateControllerImpl2::OnLockStateChanged(bool locked) {
66 if (shutting_down_ || (system_is_locked_ == locked)) 66 if (shutting_down_ || (system_is_locked_ == locked))
67 return; 67 return;
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 if (!shutting_down_) 208 if (!shutting_down_)
209 RequestShutdownImpl(); 209 RequestShutdownImpl();
210 } 210 }
211 211
212 void SessionStateControllerImpl2::RequestShutdownImpl() { 212 void SessionStateControllerImpl2::RequestShutdownImpl() {
213 DCHECK(!shutting_down_); 213 DCHECK(!shutting_down_);
214 shutting_down_ = true; 214 shutting_down_ = true;
215 215
216 Shell* shell = ash::Shell::GetInstance(); 216 Shell* shell = ash::Shell::GetInstance();
217 shell->env_filter()->set_cursor_hidden_by_filter(false); 217 shell->env_filter()->set_cursor_hidden_by_filter(false);
218 shell->cursor_manager()->ShowCursor(false); 218 shell->cursor_manager()->EnableCursor(false);
219 219
220 animator_->StartGlobalAnimation( 220 animator_->StartGlobalAnimation(
221 internal::SessionStateAnimator::ANIMATION_GRAYSCALE_BRIGHTNESS, 221 internal::SessionStateAnimator::ANIMATION_GRAYSCALE_BRIGHTNESS,
222 internal::SessionStateAnimator::ANIMATION_SPEED_SHUTDOWN); 222 internal::SessionStateAnimator::ANIMATION_SPEED_SHUTDOWN);
223 StartRealShutdownTimer(); 223 StartRealShutdownTimer();
224 } 224 }
225 225
226 void SessionStateControllerImpl2::OnRootWindowHostCloseRequested( 226 void SessionStateControllerImpl2::OnRootWindowHostCloseRequested(
227 const aura::RootWindow*) { 227 const aura::RootWindow*) {
228 Shell::GetInstance()->delegate()->Exit(); 228 Shell::GetInstance()->delegate()->Exit();
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 void SessionStateControllerImpl2::OnLockScreenHide( 311 void SessionStateControllerImpl2::OnLockScreenHide(
312 base::Callback<void(void)>& callback) { 312 base::Callback<void(void)>& callback) {
313 animator_->StartAnimationWithCallback( 313 animator_->StartAnimationWithCallback(
314 internal::SessionStateAnimator::LOCK_SCREEN_CONTAINERS, 314 internal::SessionStateAnimator::LOCK_SCREEN_CONTAINERS,
315 internal::SessionStateAnimator::ANIMATION_LIFT, 315 internal::SessionStateAnimator::ANIMATION_LIFT,
316 internal::SessionStateAnimator::ANIMATION_SPEED_MOVE_WINDOWS, 316 internal::SessionStateAnimator::ANIMATION_SPEED_MOVE_WINDOWS,
317 callback); 317 callback);
318 } 318 }
319 319
320 } // namespace ash 320 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698