| OLD | NEW |
| 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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::Closure 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(const base::Closure& 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; |
| 126 void OnLockStateChanged(bool locked) override; | 126 void OnLockStateChanged(bool locked) override; |
| 127 | 127 |
| 128 void set_animator_for_test(SessionStateAnimator* animator) { | 128 void set_animator_for_test(SessionStateAnimator* animator) { |
| 129 animator_.reset(animator); | 129 animator_.reset(animator); |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 | 233 |
| 234 // Started when we begin displaying the pre-shutdown animation. When it | 234 // Started when we begin displaying the pre-shutdown animation. When it |
| 235 // fires, we start the shutdown animation and get ready to request shutdown. | 235 // fires, we start the shutdown animation and get ready to request shutdown. |
| 236 base::OneShotTimer pre_shutdown_timer_; | 236 base::OneShotTimer pre_shutdown_timer_; |
| 237 | 237 |
| 238 // Started when we display the shutdown animation. When it fires, we actually | 238 // Started when we display the shutdown animation. When it fires, we actually |
| 239 // request shutdown. Gives the animation time to complete before Chrome, X, | 239 // request shutdown. Gives the animation time to complete before Chrome, X, |
| 240 // etc. are shut down. | 240 // etc. are shut down. |
| 241 base::OneShotTimer real_shutdown_timer_; | 241 base::OneShotTimer real_shutdown_timer_; |
| 242 | 242 |
| 243 base::Closure lock_screen_displayed_callback_; | 243 base::OnceClosure lock_screen_displayed_callback_; |
| 244 | 244 |
| 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_ |
| OLD | NEW |