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

Unified Diff: ash/session/session_controller.h

Issue 2830933002: cros: Use SessionController for lock starting code (Closed)
Patch Set: fix nit Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/public/interfaces/session_controller.mojom ('k') | ash/session/session_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/session/session_controller.h
diff --git a/ash/session/session_controller.h b/ash/session/session_controller.h
index 5500b410eaa2aa120d25f978bbf2d7b27413b0f6..9657826c9f87fa374cfcc718db63e29946249c2e 100644
--- a/ash/session/session_controller.h
+++ b/ash/session/session_controller.h
@@ -13,7 +13,9 @@
#include "ash/login_status.h"
#include "ash/public/cpp/session_types.h"
#include "ash/public/interfaces/session_controller.mojom.h"
+#include "base/callback.h"
#include "base/macros.h"
+#include "base/memory/weak_ptr.h"
#include "base/observer_list.h"
#include "mojo/public/cpp/bindings/binding_set.h"
@@ -110,6 +112,7 @@ class ASH_EXPORT SessionController
void UpdateUserSession(mojom::UserSessionPtr user_session) override;
void SetUserSessionOrder(
const std::vector<uint32_t>& user_session_order) override;
+ void StartLock(const StartLockCallback& callback) override;
void RunUnlockAnimation(const RunUnlockAnimationCallback& callback) override;
void NotifyChromeTerminating() override;
@@ -131,6 +134,11 @@ class ASH_EXPORT SessionController
// Update the |login_status_| and notify observers.
void UpdateLoginStatus();
+ // Used as lock screen displayed callback of LockStateController and invoked
+ // when post lock animation finishes and ash is fully locked. It would then
+ // run |start_lock_callback_| to indicate ash is locked successfully.
+ void OnLockAnimationFinished();
+
// Bindings for mojom::SessionController interface.
mojo::BindingSet<mojom::SessionController> bindings_;
@@ -160,8 +168,13 @@ class ASH_EXPORT SessionController
// animation starts and reset when session state is no longer LOCKED.
bool is_unlocking_ = false;
+ // Pending callback for the StartLock request.
+ base::OnceCallback<void(bool)> start_lock_callback_;
+
base::ObserverList<ash::SessionObserver> observers_;
+ base::WeakPtrFactory<SessionController> weak_ptr_factory_;
+
DISALLOW_COPY_AND_ASSIGN(SessionController);
};
« no previous file with comments | « ash/public/interfaces/session_controller.mojom ('k') | ash/session/session_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698