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

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

Issue 15974008: Rename SessionStateController -> LockStateController (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 6 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
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_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/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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 return; 66 return;
67 67
68 system_is_locked_ = locked; 68 system_is_locked_ = locked;
69 69
70 if (locked) { 70 if (locked) {
71 animator_->StartAnimation( 71 animator_->StartAnimation(
72 internal::SessionStateAnimator::LOCK_SCREEN_CONTAINERS, 72 internal::SessionStateAnimator::LOCK_SCREEN_CONTAINERS,
73 internal::SessionStateAnimator::ANIMATION_FADE_IN, 73 internal::SessionStateAnimator::ANIMATION_FADE_IN,
74 internal::SessionStateAnimator::ANIMATION_SPEED_SHOW_LOCK_SCREEN); 74 internal::SessionStateAnimator::ANIMATION_SPEED_SHOW_LOCK_SCREEN);
75 DispatchCancelMode(); 75 DispatchCancelMode();
76 FOR_EACH_OBSERVER(SessionStateObserver, observers_, 76 FOR_EACH_OBSERVER(SessionLockStateObserver, observers_,
77 OnSessionStateEvent( 77 OnSessionLockStateEvent(
78 SessionStateObserver::EVENT_LOCK_ANIMATION_STARTED)); 78 SessionLockStateObserver::EVENT_LOCK_ANIMATION_STARTED));
79 lock_timer_.Stop(); 79 lock_timer_.Stop();
80 lock_fail_timer_.Stop(); 80 lock_fail_timer_.Stop();
81 81
82 if (shutdown_after_lock_) { 82 if (shutdown_after_lock_) {
83 shutdown_after_lock_ = false; 83 shutdown_after_lock_ = false;
84 StartLockToShutdownTimer(); 84 StartLockToShutdownTimer();
85 } 85 }
86 } else { 86 } else {
87 animator_->StartAnimation( 87 animator_->StartAnimation(
88 internal::SessionStateAnimator::DESKTOP_BACKGROUND | 88 internal::SessionStateAnimator::DESKTOP_BACKGROUND |
(...skipping 12 matching lines...) Expand all
101 internal::SessionStateAnimator::LAUNCHER, 101 internal::SessionStateAnimator::LAUNCHER,
102 internal::SessionStateAnimator::ANIMATION_HIDE_IMMEDIATELY, 102 internal::SessionStateAnimator::ANIMATION_HIDE_IMMEDIATELY,
103 internal::SessionStateAnimator::ANIMATION_SPEED_IMMEDIATE); 103 internal::SessionStateAnimator::ANIMATION_SPEED_IMMEDIATE);
104 104
105 animator_->StartAnimation( 105 animator_->StartAnimation(
106 internal::SessionStateAnimator::NON_LOCK_SCREEN_CONTAINERS, 106 internal::SessionStateAnimator::NON_LOCK_SCREEN_CONTAINERS,
107 internal::SessionStateAnimator::ANIMATION_FULL_CLOSE, 107 internal::SessionStateAnimator::ANIMATION_FULL_CLOSE,
108 internal::SessionStateAnimator::ANIMATION_SPEED_FAST); 108 internal::SessionStateAnimator::ANIMATION_SPEED_FAST);
109 109
110 DispatchCancelMode(); 110 DispatchCancelMode();
111 FOR_EACH_OBSERVER(SessionStateObserver, observers_, 111 FOR_EACH_OBSERVER(SessionLockStateObserver, observers_,
112 OnSessionStateEvent(SessionStateObserver::EVENT_LOCK_ANIMATION_STARTED)); 112 OnSessionLockStateEvent(
113 SessionLockStateObserver::EVENT_LOCK_ANIMATION_STARTED));
113 114
114 // Hide the screen locker containers so we can make them fade in later. 115 // Hide the screen locker containers so we can make them fade in later.
115 animator_->StartAnimation( 116 animator_->StartAnimation(
116 internal::SessionStateAnimator::LOCK_SCREEN_CONTAINERS, 117 internal::SessionStateAnimator::LOCK_SCREEN_CONTAINERS,
117 internal::SessionStateAnimator::ANIMATION_HIDE_IMMEDIATELY, 118 internal::SessionStateAnimator::ANIMATION_HIDE_IMMEDIATELY,
118 internal::SessionStateAnimator::ANIMATION_SPEED_IMMEDIATE); 119 internal::SessionStateAnimator::ANIMATION_SPEED_IMMEDIATE);
119 } 120 }
120 121
121 void SessionStateControllerImpl::StartLockAnimationAndLockImmediately() { 122 void SessionStateControllerImpl::StartLockAnimationAndLockImmediately() {
122 animator_->StartAnimation( 123 animator_->StartAnimation(
123 internal::SessionStateAnimator::NON_LOCK_SCREEN_CONTAINERS, 124 internal::SessionStateAnimator::NON_LOCK_SCREEN_CONTAINERS,
124 internal::SessionStateAnimator::ANIMATION_PARTIAL_CLOSE, 125 internal::SessionStateAnimator::ANIMATION_PARTIAL_CLOSE,
125 internal::SessionStateAnimator::ANIMATION_SPEED_UNDOABLE); 126 internal::SessionStateAnimator::ANIMATION_SPEED_UNDOABLE);
126 DispatchCancelMode(); 127 DispatchCancelMode();
127 FOR_EACH_OBSERVER(SessionStateObserver, observers_, 128 FOR_EACH_OBSERVER(SessionLockStateObserver, observers_,
128 OnSessionStateEvent(SessionStateObserver::EVENT_LOCK_ANIMATION_STARTED)); 129 OnSessionLockStateEvent(
130 SessionLockStateObserver::EVENT_LOCK_ANIMATION_STARTED));
129 OnLockTimeout(); 131 OnLockTimeout();
130 } 132 }
131 133
132 void SessionStateControllerImpl::StartLockAnimation(bool shutdown_after_lock) { 134 void SessionStateControllerImpl::StartLockAnimation(bool shutdown_after_lock) {
133 shutdown_after_lock_ = shutdown_after_lock; 135 shutdown_after_lock_ = shutdown_after_lock;
134 136
135 animator_->StartAnimation( 137 animator_->StartAnimation(
136 internal::SessionStateAnimator::NON_LOCK_SCREEN_CONTAINERS, 138 internal::SessionStateAnimator::NON_LOCK_SCREEN_CONTAINERS,
137 internal::SessionStateAnimator::ANIMATION_PARTIAL_CLOSE, 139 internal::SessionStateAnimator::ANIMATION_PARTIAL_CLOSE,
138 internal::SessionStateAnimator::ANIMATION_SPEED_UNDOABLE); 140 internal::SessionStateAnimator::ANIMATION_SPEED_UNDOABLE);
139 DispatchCancelMode(); 141 DispatchCancelMode();
140 FOR_EACH_OBSERVER(SessionStateObserver, observers_, 142 FOR_EACH_OBSERVER(SessionLockStateObserver, observers_,
141 OnSessionStateEvent( 143 OnSessionLockStateEvent(
142 SessionStateObserver::EVENT_PRELOCK_ANIMATION_STARTED)); 144 SessionLockStateObserver::EVENT_PRELOCK_ANIMATION_STARTED));
143 StartLockTimer(); 145 StartLockTimer();
144 } 146 }
145 147
146 void SessionStateControllerImpl::StartShutdownAnimation() { 148 void SessionStateControllerImpl::StartShutdownAnimation() {
147 animator_->StartAnimation( 149 animator_->StartAnimation(
148 internal::SessionStateAnimator::kAllContainersMask, 150 internal::SessionStateAnimator::kAllContainersMask,
149 internal::SessionStateAnimator::ANIMATION_PARTIAL_CLOSE, 151 internal::SessionStateAnimator::ANIMATION_PARTIAL_CLOSE,
150 internal::SessionStateAnimator::ANIMATION_SPEED_UNDOABLE); 152 internal::SessionStateAnimator::ANIMATION_SPEED_UNDOABLE);
151 153
152 StartPreShutdownAnimationTimer(); 154 StartPreShutdownAnimationTimer();
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 void SessionStateControllerImpl::OnLockScreenHide(base::Closure& callback) { 339 void SessionStateControllerImpl::OnLockScreenHide(base::Closure& callback) {
338 callback.Run(); 340 callback.Run();
339 } 341 }
340 342
341 void SessionStateControllerImpl::SetLockScreenDisplayedCallback( 343 void SessionStateControllerImpl::SetLockScreenDisplayedCallback(
342 base::Closure& callback) { 344 base::Closure& callback) {
343 NOTIMPLEMENTED(); 345 NOTIMPLEMENTED();
344 } 346 }
345 347
346 } // namespace ash 348 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698