diff options
author | gavinp@chromium.org <gavinp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-17 14:47:48 +0000 |
---|---|---|
committer | gavinp@chromium.org <gavinp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-17 14:47:48 +0000 |
commit | f2192efaf719d6e54459fde8ef38093e08e194e0 (patch) | |
tree | 26b06fa106a8ab701dcda5e4c00f959d9d82a700 /ash/shell_delegate.h | |
parent | b0b94f5c503e44cc2190a9c7c4d20425f77e6a42 (diff) | |
download | chromium_src-f2192efaf719d6e54459fde8ef38093e08e194e0.zip chromium_src-f2192efaf719d6e54459fde8ef38093e08e194e0.tar.gz chromium_src-f2192efaf719d6e54459fde8ef38093e08e194e0.tar.bz2 |
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
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@194589 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/shell_delegate.h')
-rw-r--r-- | ash/shell_delegate.h | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/ash/shell_delegate.h b/ash/shell_delegate.h index 0ff5fe6..99aeb6e 100644 --- a/ash/shell_delegate.h +++ b/ash/shell_delegate.h @@ -45,7 +45,6 @@ class LauncherDelegate; class LauncherModel; struct LauncherItem; class RootWindowHostFactory; -class SessionStateDelegate; class SystemTrayDelegate; class UserWallpaperDelegate; @@ -99,6 +98,15 @@ class ASH_EXPORT ShellDelegate { // The Shell owns the delegate. virtual ~ShellDelegate() {} + // Returns true if user has logged in. + virtual bool IsUserLoggedIn() const = 0; + + // Returns true if we're logged in and browser has been started + virtual bool IsSessionStarted() const = 0; + + // Returns true if we're logged in as guest. + virtual bool IsGuestSession() const = 0; + // Returns true if this is the first time that the shell has been run after // the system has booted. false is returned after the shell has been // restarted, typically due to logging in as a guest or logging out. @@ -110,6 +118,19 @@ class ASH_EXPORT ShellDelegate { // Returns true if we're running in forced app mode. virtual bool IsRunningInForcedAppMode() const = 0; + // Returns true if a user is logged in whose session can be locked (i.e. the + // user has a password with which to unlock the session). + virtual bool CanLockScreen() const = 0; + + // Invoked when a user locks the screen. + virtual void LockScreen() = 0; + + // Unlock the screen. Currently used only for tests. + virtual void UnlockScreen() = 0; + + // Returns true if the screen is currently locked. + virtual bool IsScreenLocked() const = 0; + // Called before processing |Shell::Init()| so that the delegate // can perform tasks necessary before the shell is initialized. virtual void PreInit() = 0; @@ -205,9 +226,6 @@ class ASH_EXPORT ShellDelegate { // Creates a caps lock delegate. Shell takes ownership of the delegate. virtual CapsLockDelegate* CreateCapsLockDelegate() = 0; - // Creates a session state delegate. Shell takes ownership of the delegate. - virtual SessionStateDelegate* CreateSessionStateDelegate() = 0; - // Creates a user action client. Shell takes ownership of the object. virtual aura::client::UserActionClient* CreateUserActionClient() = 0; |