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

Unified Diff: ash/session/session_controller.h

Issue 2923083002: chromeos: Convert system tray session length limit to mojo (Closed)
Patch Set: rebase Created 3 years, 6 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 7f6cd864bbbd81fa159e3f0b131a775c9ea360f4..22952b761c34f25ae9ef235dceabacb3e9004fb1 100644
--- a/ash/session/session_controller.h
+++ b/ash/session/session_controller.h
@@ -17,6 +17,7 @@
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "base/observer_list.h"
+#include "base/time/time.h"
#include "mojo/public/cpp/bindings/binding_set.h"
class AccountId;
@@ -34,6 +35,9 @@ class ASH_EXPORT SessionController
SessionController();
~SessionController() override;
+ base::TimeDelta session_length_limit() const { return session_length_limit_; }
+ base::TimeTicks session_start_time() const { return session_start_time_; }
+
// Binds the mojom::SessionControllerRequest to this object.
void BindRequest(mojom::SessionControllerRequest request);
@@ -124,6 +128,8 @@ class ASH_EXPORT SessionController
void NotifyChromeLockAnimationsComplete() override;
void RunUnlockAnimation(RunUnlockAnimationCallback callback) override;
void NotifyChromeTerminating() override;
+ void SetSessionLengthLimit(base::TimeDelta length_limit,
+ base::TimeTicks start_time) override;
// Test helpers.
void ClearUserSessionsForTest();
@@ -180,6 +186,14 @@ class ASH_EXPORT SessionController
// Pending callback for the StartLock request.
base::OnceCallback<void(bool)> start_lock_callback_;
+ // The session length limit; set to zero if there is no limit.
+ base::TimeDelta session_length_limit_;
+
+ // The session start time, set at login or on the first user activity; set to
+ // null if there is no session length limit. This value is also stored in a
+ // pref in case of a crash during the session.
+ base::TimeTicks session_start_time_;
+
base::ObserverList<ash::SessionObserver> observers_;
base::WeakPtrFactory<SessionController> weak_ptr_factory_;
« 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