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

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

Issue 11276025: Add lock pod animation on unlock. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Make it compile Created 8 years, 1 month 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
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 #ifndef ASH_WM_SESSION_STATE_CONTROLLER_IMPL2_H_ 5 #ifndef ASH_WM_SESSION_STATE_CONTROLLER_IMPL2_H_
6 #define ASH_WM_SESSION_STATE_CONTROLLER_IMPL2_H_ 6 #define ASH_WM_SESSION_STATE_CONTROLLER_IMPL2_H_
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "ash/shell_observer.h" 9 #include "ash/shell_observer.h"
10 #include "ash/wm/session_state_animator.h" 10 #include "ash/wm/session_state_animator.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 89
90 // RootWindowObserver override: 90 // RootWindowObserver override:
91 virtual void OnRootWindowHostCloseRequested( 91 virtual void OnRootWindowHostCloseRequested(
92 const aura::RootWindow* root) OVERRIDE; 92 const aura::RootWindow* root) OVERRIDE;
93 93
94 // ShellObserver overrides: 94 // ShellObserver overrides:
95 virtual void OnLoginStateChanged(user::LoginStatus status) OVERRIDE; 95 virtual void OnLoginStateChanged(user::LoginStatus status) OVERRIDE;
96 virtual void OnAppTerminating() OVERRIDE; 96 virtual void OnAppTerminating() OVERRIDE;
97 virtual void OnLockStateChanged(bool locked) OVERRIDE; 97 virtual void OnLockStateChanged(bool locked) OVERRIDE;
98 98
99 // Returns true iff when we're in state when user session can be locked. 99 // SessionStateController overrides:
100 virtual bool IsEligibleForLock() OVERRIDE; 100 virtual bool IsEligibleForLock() OVERRIDE;
101
102 // Returns true if system is locked.
103 virtual bool IsLocked() OVERRIDE; 101 virtual bool IsLocked() OVERRIDE;
104
105 // Starts locking (with slow animation) that can be cancelled.
106 // After locking and |kLockToShutdownTimeoutMs| StartShutdownAnimation()
107 // will be called unless CancelShutdownAnimation() is called, if
108 // shutdown_after_lock is true.
109 virtual void StartLockAnimation(bool shutdown_after_lock) OVERRIDE; 102 virtual void StartLockAnimation(bool shutdown_after_lock) OVERRIDE;
110 103
111 // Starts shutting down (with slow animation) that can be cancelled.
112 virtual void StartShutdownAnimation() OVERRIDE; 104 virtual void StartShutdownAnimation() OVERRIDE;
113
114 // Starts usual lock animation, but locks immediately.
115 // Unlike StartLockAnimation it does no lead to StartShutdownAnimation.
116 virtual void StartLockAnimationAndLockImmediately() OVERRIDE; 105 virtual void StartLockAnimationAndLockImmediately() OVERRIDE;
117 106
118 // Returns true if we have requested system to lock, but haven't received
119 // confirmation yet.
120 virtual bool LockRequested() OVERRIDE; 107 virtual bool LockRequested() OVERRIDE;
121
122 // Returns true if we are shutting down.
123 virtual bool ShutdownRequested() OVERRIDE; 108 virtual bool ShutdownRequested() OVERRIDE;
124 109
125 // Returns true if we are within cancellable lock timeframe.
126 virtual bool CanCancelLockAnimation() OVERRIDE; 110 virtual bool CanCancelLockAnimation() OVERRIDE;
127
128 // Cancels locking and reverts lock animation.
129 virtual void CancelLockAnimation() OVERRIDE; 111 virtual void CancelLockAnimation() OVERRIDE;
130 112
131 // Returns true if we are within cancellable shutdown timeframe.
132 virtual bool CanCancelShutdownAnimation() OVERRIDE; 113 virtual bool CanCancelShutdownAnimation() OVERRIDE;
133
134 // Cancels shutting down and reverts shutdown animation.
135 virtual void CancelShutdownAnimation() OVERRIDE; 114 virtual void CancelShutdownAnimation() OVERRIDE;
136 115
137 // Called when Chrome gets a request to display the lock screen.
138 virtual void OnStartingLock() OVERRIDE; 116 virtual void OnStartingLock() OVERRIDE;
117 virtual void RequestShutdown() OVERRIDE;
139 118
140 // Displays the shutdown animation and requests shutdown when it's done. 119 virtual void OnLockScreenHide(base::Callback<void(void)>& callback) OVERRIDE;
141 virtual void RequestShutdown() OVERRIDE;
142 120
143 protected: 121 protected:
144 friend class test::PowerButtonControllerTest; 122 friend class test::PowerButtonControllerTest;
145 123
146 bool IsLoggedInAsNonGuest() const; 124 bool IsLoggedInAsNonGuest() const;
147 125
148 private: 126 private:
149 void RequestShutdownImpl(); 127 void RequestShutdownImpl();
150 128
151 // Starts lock timer. 129 // Starts lock timer.
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 // request shutdown. Gives the animation time to complete before Chrome, X, 188 // request shutdown. Gives the animation time to complete before Chrome, X,
211 // etc. are shut down. 189 // etc. are shut down.
212 base::OneShotTimer<SessionStateControllerImpl2> real_shutdown_timer_; 190 base::OneShotTimer<SessionStateControllerImpl2> real_shutdown_timer_;
213 191
214 DISALLOW_COPY_AND_ASSIGN(SessionStateControllerImpl2); 192 DISALLOW_COPY_AND_ASSIGN(SessionStateControllerImpl2);
215 }; 193 };
216 194
217 } // namespace ash 195 } // namespace ash
218 196
219 #endif // ASH_WM_SESSION_STATE_CONTROLLER_IMPL2_H_ 197 #endif // ASH_WM_SESSION_STATE_CONTROLLER_IMPL2_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698