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

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

Issue 2867673004: Use OnceCallback on Mojo interfaces in //ash (Closed)
Patch Set: count -> container_count Created 3 years, 7 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
« no previous file with comments | « ash/test/test_session_state_animator.cc ('k') | ash/wm/lock_state_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_LOCK_STATE_CONTROLLER_H_ 5 #ifndef ASH_WM_LOCK_STATE_CONTROLLER_H_
6 #define ASH_WM_LOCK_STATE_CONTROLLER_H_ 6 #define ASH_WM_LOCK_STATE_CONTROLLER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "ash/ash_export.h" 10 #include "ash/ash_export.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 // Called when Chrome gets a request to display the lock screen. 105 // Called when Chrome gets a request to display the lock screen.
106 void OnStartingLock(); 106 void OnStartingLock();
107 107
108 // Displays the shutdown animation and requests a system shutdown or system 108 // Displays the shutdown animation and requests a system shutdown or system
109 // restart depending on the the state of the |RebootOnShutdown| device policy. 109 // restart depending on the the state of the |RebootOnShutdown| device policy.
110 void RequestShutdown(); 110 void RequestShutdown();
111 111
112 // Called when ScreenLocker is ready to close, but not yet destroyed. 112 // Called when ScreenLocker is ready to close, but not yet destroyed.
113 // Can be used to display "hiding" animations on unlock. 113 // Can be used to display "hiding" animations on unlock.
114 // |callback| will be called when all animations are done. 114 // |callback| will be called when all animations are done.
115 void OnLockScreenHide(base::Closure callback); 115 void OnLockScreenHide(base::OnceClosure callback);
116 116
117 // Sets up the callback that should be called once lock animation is finished. 117 // Sets up the callback that should be called once lock animation is finished.
118 // Callback is guaranteed to be called once and then discarded. 118 // Callback is guaranteed to be called once and then discarded.
119 void SetLockScreenDisplayedCallback(base::OnceClosure callback); 119 void SetLockScreenDisplayedCallback(base::OnceClosure callback);
120 120
121 // aura::WindowTreeHostObserver override: 121 // aura::WindowTreeHostObserver override:
122 void OnHostCloseRequested(const aura::WindowTreeHost* host) override; 122 void OnHostCloseRequested(const aura::WindowTreeHost* host) override;
123 123
124 // SessionObserver overrides: 124 // SessionObserver overrides:
125 void OnChromeTerminating() override; 125 void OnChromeTerminating() override;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 166
167 // If |request_lock_on_completion| is true, a lock request will be sent 167 // If |request_lock_on_completion| is true, a lock request will be sent
168 // after the pre-lock animation completes. (The pre-lock animation is 168 // after the pre-lock animation completes. (The pre-lock animation is
169 // also displayed in response to already-in-progress lock requests; in 169 // also displayed in response to already-in-progress lock requests; in
170 // these cases an additional lock request is undesirable.) 170 // these cases an additional lock request is undesirable.)
171 void StartImmediatePreLockAnimation(bool request_lock_on_completion); 171 void StartImmediatePreLockAnimation(bool request_lock_on_completion);
172 void StartCancellablePreLockAnimation(); 172 void StartCancellablePreLockAnimation();
173 void CancelPreLockAnimation(); 173 void CancelPreLockAnimation();
174 void StartPostLockAnimation(); 174 void StartPostLockAnimation();
175 // This method calls |callback| when animation completes. 175 // This method calls |callback| when animation completes.
176 void StartUnlockAnimationBeforeUIDestroyed(base::Closure& callback); 176 void StartUnlockAnimationBeforeUIDestroyed(base::OnceClosure callback);
177 void StartUnlockAnimationAfterUIDestroyed(); 177 void StartUnlockAnimationAfterUIDestroyed();
178 178
179 // These methods are called when corresponding animation completes. 179 // These methods are called when corresponding animation completes.
180 void LockAnimationCancelled(); 180 void LockAnimationCancelled();
181 void PreLockAnimationFinished(bool request_lock); 181 void PreLockAnimationFinished(bool request_lock);
182 void PostLockAnimationFinished(); 182 void PostLockAnimationFinished();
183 void UnlockAnimationAfterUIDestroyedFinished(); 183 void UnlockAnimationAfterUIDestroyedFinished();
184 184
185 // Stores properties of UI that have to be temporarily modified while locking. 185 // Stores properties of UI that have to be temporarily modified while locking.
186 void StoreUnlockedProperties(); 186 void StoreUnlockedProperties();
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 ScopedSessionObserver scoped_session_observer_; 245 ScopedSessionObserver scoped_session_observer_;
246 246
247 base::WeakPtrFactory<LockStateController> weak_ptr_factory_; 247 base::WeakPtrFactory<LockStateController> weak_ptr_factory_;
248 248
249 DISALLOW_COPY_AND_ASSIGN(LockStateController); 249 DISALLOW_COPY_AND_ASSIGN(LockStateController);
250 }; 250 };
251 251
252 } // namespace ash 252 } // namespace ash
253 253
254 #endif // ASH_WM_LOCK_STATE_CONTROLLER_H_ 254 #endif // ASH_WM_LOCK_STATE_CONTROLLER_H_
OLDNEW
« no previous file with comments | « ash/test/test_session_state_animator.cc ('k') | ash/wm/lock_state_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698