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

Unified Diff: ash/common/session/session_state_delegate.h

Issue 2734933004: ash: Use SessionController instead of SessionStateDelegate (Closed)
Patch Set: rebase Created 3 years, 9 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/common/session/session_state_delegate.h
diff --git a/ash/common/session/session_state_delegate.h b/ash/common/session/session_state_delegate.h
index 166b20ffdc8aeefbb1cd43d0f896521ed830eb6b..f1c232d94be76948239aedceb418b95e21cb5441 100644
--- a/ash/common/session/session_state_delegate.h
+++ b/ash/common/session/session_state_delegate.h
@@ -6,22 +6,13 @@
#define ASH_COMMON_SESSION_SESSION_STATE_DELEGATE_H_
#include "ash/ash_export.h"
-#include "ash/public/cpp/session_types.h"
-#include "components/session_manager/session_manager_types.h"
-
-class AccountId;
namespace gfx {
class ImageSkia;
}
-namespace user_manager {
-class UserInfo;
-}
-
namespace ash {
-class SessionStateObserver;
class WmWindow;
// Delegate for checking and modifying the session state.
@@ -31,73 +22,11 @@ class ASH_EXPORT SessionStateDelegate {
public:
virtual ~SessionStateDelegate() {}
- // Returns the maximum possible number of logged in users.
- virtual int GetMaximumNumberOfLoggedInUsers() const = 0;
-
- // Returns the number of signed in users. If 0 is returned, there is either
- // no session in progress or no active user.
- virtual int NumberOfLoggedInUsers() const = 0;
-
- // Gets the policy of adding a user session to ash.
- virtual AddUserSessionPolicy GetAddUserSessionPolicy() const;
-
- // 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;
-
- // Returns true if the screen should be locked automatically when the screen
- // is turned off or the system is suspended.
- virtual bool ShouldLockScreenAutomatically() const = 0;
-
- // Locks the screen. The locking happens asynchronously.
- virtual void LockScreen() = 0;
-
- // Unlocks the screen.
- virtual void UnlockScreen() = 0;
-
- // Returns |true| if user session blocked by some overlying UI. It can be
- // login screen, lock screen or screen for adding users into multi-profile
- // session.
- virtual bool IsUserSessionBlocked() const = 0;
-
- // Returns current session state.
- virtual session_manager::SessionState GetSessionState() const = 0;
-
- // Gets the user info for the user with the given |index|. See session_types.h
- // for a description of UserIndex.
- // Note that |index| can at maximum be |NumberOfLoggedInUsers() - 1|.
- virtual const user_manager::UserInfo* GetUserInfo(UserIndex index) const = 0;
-
// Whether or not the window's title should show the avatar.
virtual bool ShouldShowAvatar(WmWindow* window) const = 0;
// Returns the avatar image for the specified window.
virtual gfx::ImageSkia GetAvatarImageForWindow(WmWindow* window) const = 0;
-
- // Switches to another active user with |account_id|
- // (if that user has already signed in).
- virtual void SwitchActiveUser(const AccountId& account_id) = 0;
-
- // Switches the active user to the next or previous user, with the same
- // ordering as GetLoggedInUsers.
- virtual void CycleActiveUser(CycleUserDirection direction) = 0;
-
- // Returns true if primary user policy does not forbid multiple signin.
- virtual bool IsMultiProfileAllowedByPrimaryUserPolicy() const = 0;
-
- // Adds or removes sessions state observer.
- virtual void AddSessionStateObserver(SessionStateObserver* observer) = 0;
- virtual void RemoveSessionStateObserver(SessionStateObserver* observer) = 0;
-
- bool IsInSecondaryLoginScreen() const;
};
} // namespace ash

Powered by Google App Engine
This is Rietveld 408576698