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

Unified Diff: ash/session_state_delegate.h

Issue 14295008: Add ash SessionStateDelegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ready for review. Created 7 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
Index: ash/session_state_delegate.h
diff --git a/ash/session_state_delegate.h b/ash/session_state_delegate.h
new file mode 100644
index 0000000000000000000000000000000000000000..4ae398ffc1330c5f60f4892725f752a29d7668a3
--- /dev/null
+++ b/ash/session_state_delegate.h
@@ -0,0 +1,41 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef ASH_SESSION_STATE_DELEGATE_H_
+#define ASH_SESSION_STATE_DELEGATE_H_
+
+#include "ash/ash_export.h"
+
+namespace ash {
+
+// Delegate for checking and modifying the session state.
+class ASH_EXPORT SessionStateDelegate {
+ public:
+ virtual ~SessionStateDelegate() {};
+
+ // Returns |true| if a session is in progress and there is an active user.
+ virtual bool HasActiveUser() const = 0;
+
+ // Returns |true| if the session has been fully started for the active user.
+ // When a user becomes active, the profile and browser UI are not immediately
+ // available. Only once this method starts returning |true| is the browser
+ // startup complete and both profile and UI are fully available.
+ virtual bool IsActiveUserSessionStarted() const = 0;
+
+ // Returns true if the screen can be locked.
+ virtual bool CanLockScreen() const = 0;
+
+ // Returns true if the screen is currently locked.
+ virtual bool IsScreenLocked() const = 0;
+
+ // Locks the screen.
Daniel Erat 2013/04/16 17:34:15 nit: mention that is possibly asynchronous
bartfab (slow) 2013/04/17 08:14:41 Done.
+ virtual void LockScreen() = 0;
+
+ // Unlocks the screen.
+ virtual void UnlockScreen() = 0;
+};
+
+} // namespace ash
+
+#endif // ASH_SESSION_STATE_DELEGATE_H_

Powered by Google App Engine
This is Rietveld 408576698