| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 CHROME_BROWSER_UI_ASH_SESSION_CONTROLLER_CLIENT_H_ | 5 #ifndef CHROME_BROWSER_UI_ASH_SESSION_CONTROLLER_CLIENT_H_ |
| 6 #define CHROME_BROWSER_UI_ASH_SESSION_CONTROLLER_CLIENT_H_ | 6 #define CHROME_BROWSER_UI_ASH_SESSION_CONTROLLER_CLIENT_H_ |
| 7 | 7 |
| 8 #include "ash/public/interfaces/session_controller.mojom.h" | 8 #include "ash/public/interfaces/session_controller.mojom.h" |
| 9 #include "base/callback_forward.h" | 9 #include "base/callback_forward.h" |
| 10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 | 45 |
| 46 static SessionControllerClient* Get(); | 46 static SessionControllerClient* Get(); |
| 47 | 47 |
| 48 // Calls SessionController to start locking ash. |callback| will be invoked | 48 // Calls SessionController to start locking ash. |callback| will be invoked |
| 49 // to indicate whether the lock is successful. If |locked| is true, the post | 49 // to indicate whether the lock is successful. If |locked| is true, the post |
| 50 // lock animation is finished and ash is fully locked. Otherwise, the lock | 50 // lock animation is finished and ash is fully locked. Otherwise, the lock |
| 51 // is failed somehow. | 51 // is failed somehow. |
| 52 using StartLockCallback = base::Callback<void(bool locked)>; | 52 using StartLockCallback = base::Callback<void(bool locked)>; |
| 53 void StartLock(StartLockCallback callback); | 53 void StartLock(StartLockCallback callback); |
| 54 | 54 |
| 55 // Notifies SessionController that chrome lock animations are finished. |
| 56 void NotifyChromeLockAnimationsComplete(); |
| 57 |
| 55 // Calls ash SessionController to run unlock animation. | 58 // Calls ash SessionController to run unlock animation. |
| 56 // |animation_finished_callback| will be invoked when the animation finishes. | 59 // |animation_finished_callback| will be invoked when the animation finishes. |
| 57 void RunUnlockAnimation(base::Closure animation_finished_callback); | 60 void RunUnlockAnimation(base::Closure animation_finished_callback); |
| 58 | 61 |
| 59 // ash::mojom::SessionControllerClient: | 62 // ash::mojom::SessionControllerClient: |
| 60 void RequestLockScreen() override; | 63 void RequestLockScreen() override; |
| 61 void SwitchActiveUser(const AccountId& account_id) override; | 64 void SwitchActiveUser(const AccountId& account_id) override; |
| 62 void CycleActiveUser(ash::CycleUserDirection direction) override; | 65 void CycleActiveUser(ash::CycleUserDirection direction) override; |
| 63 | 66 |
| 64 // user_manager::UserManager::UserSessionStateObserver: | 67 // user_manager::UserManager::UserSessionStateObserver: |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 content::NotificationRegistrar registrar_; | 131 content::NotificationRegistrar registrar_; |
| 129 | 132 |
| 130 ash::mojom::SessionInfoPtr last_sent_session_info_; | 133 ash::mojom::SessionInfoPtr last_sent_session_info_; |
| 131 | 134 |
| 132 base::WeakPtrFactory<SessionControllerClient> weak_ptr_factory_; | 135 base::WeakPtrFactory<SessionControllerClient> weak_ptr_factory_; |
| 133 | 136 |
| 134 DISALLOW_COPY_AND_ASSIGN(SessionControllerClient); | 137 DISALLOW_COPY_AND_ASSIGN(SessionControllerClient); |
| 135 }; | 138 }; |
| 136 | 139 |
| 137 #endif // CHROME_BROWSER_UI_ASH_SESSION_CONTROLLER_CLIENT_H_ | 140 #endif // CHROME_BROWSER_UI_ASH_SESSION_CONTROLLER_CLIENT_H_ |
| OLD | NEW |