summaryrefslogtreecommitdiffstats
path: root/ash/session_state_delegate.h
diff options
context:
space:
mode:
authorbartfab@google.com <bartfab@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-17 15:58:49 +0000
committerbartfab@google.com <bartfab@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-17 15:58:49 +0000
commitfcb123d44af34a938e26b9821849af60c69a39be (patch)
treeaab13850b4a5baaa884a95697ca860aef6feab67 /ash/session_state_delegate.h
parent6f9c92afe8310daca92f34b609ebaa37c3c7e2da (diff)
downloadchromium_src-fcb123d44af34a938e26b9821849af60c69a39be.zip
chromium_src-fcb123d44af34a938e26b9821849af60c69a39be.tar.gz
chromium_src-fcb123d44af34a938e26b9821849af60c69a39be.tar.bz2
Revert 194589 "Revert 194578 "Add ash SessionStateDelegate""
The CL turned out to be innocent, the bots turned green without the revert. > Revert 194578 "Add ash SessionStateDelegate" > > > Add ash SessionStateDelegate > > > > This CL refactors the ShellDelegate by adding a SessionStateDelegate to > > which methods dealing with the session state can be moved. This cleans up > > the huge ShellDelegate interface and paves the way for further Chrome OS > > multiprofile work which will need to add several new methods related to > > the session state. > > > > This CL is only the first step. Several other methods should also move to > > SessionStateDelegate but I do not want to overburden a single CL. > > > > BUG=None > > TEST=Manual and browser/unit tests > > > > TBR=sky (for c/b/idle_chromeos.cc and c/chrome_browser_ui.gypi) > > > > Review URL: https://codereview.chromium.org/14295008 > > TBR=bartfab@google.com > > Review URL: https://codereview.chromium.org/14200034 TBR=gavinp@chromium.org Review URL: https://codereview.chromium.org/14200038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@194602 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/session_state_delegate.h')
-rw-r--r--ash/session_state_delegate.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/ash/session_state_delegate.h b/ash/session_state_delegate.h
new file mode 100644
index 0000000..f5ee359
--- /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. The locking happens asynchronously.
+ virtual void LockScreen() = 0;
+
+ // Unlocks the screen.
+ virtual void UnlockScreen() = 0;
+};
+
+} // namespace ash
+
+#endif // ASH_SESSION_STATE_DELEGATE_H_