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

Unified Diff: ash/session_state_delegate.h

Issue 197773004: Move avatar holder code to ash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: clang fix Created 6 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
« no previous file with comments | « ash/resources/ash_resources.grd ('k') | ash/session_state_delegate_stub.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/session_state_delegate.h
diff --git a/ash/session_state_delegate.h b/ash/session_state_delegate.h
index 31e34c9b016a494b3a76cae06070fe388959d8ec..4df16171c9547a39764b2670ba57cbeb51f2fd3d 100644
--- a/ash/session_state_delegate.h
+++ b/ash/session_state_delegate.h
@@ -15,6 +15,10 @@ namespace aura {
class Window;
} // namespace aura
+namespace content {
+class BrowserContext;
+}
+
namespace gfx {
class ImageSkia;
} // namespace gfx
@@ -31,6 +35,8 @@ typedef int MultiProfileIndex;
typedef std::vector<std::string> UserIdList;
// Delegate for checking and modifying the session state.
+// TODO(oshima): Replace MultiProfileIndex with BrowsreContext, bacause
+// GetUserXXX are useful for non multi profile scenario in ash_shell.
class ASH_EXPORT SessionStateDelegate {
public:
// Defines the cycle direction for |CycleActiveUser|.
@@ -41,6 +47,10 @@ class ASH_EXPORT SessionStateDelegate {
virtual ~SessionStateDelegate() {};
+ // Returns the browser context for the user given by |index|.
+ virtual content::BrowserContext* GetBrowserContextByIndex(
+ MultiProfileIndex index) = 0;
+
// Returns the maximum possible number of logged in users.
virtual int GetMaximumNumberOfLoggedInUsers() const = 0;
@@ -91,12 +101,12 @@ class ASH_EXPORT SessionStateDelegate {
// Note that |index| can at maximum be |NumberOfLoggedInUsers() - 1|.
virtual const std::string GetUserID(MultiProfileIndex index) const = 0;
- // Gets the avatar image for the user with the given |index|.
- // Note that |index| can at maximum be |NumberOfLoggedInUsers() - 1|.
- virtual const gfx::ImageSkia& GetUserImage(MultiProfileIndex index) const = 0;
+ // Gets the avatar image for the user associated with the |context|.
+ virtual const gfx::ImageSkia& GetUserImage(
+ content::BrowserContext* context) const = 0;
- // Returns a list of all logged in users.
- virtual void GetLoggedInUsers(UserIdList* users) = 0;
+ // Whether or not the window's title should show the avatar.
+ virtual bool ShouldShowAvatar(aura::Window* window) = 0;
// Switches to another active user with |user_id|
// (if that user has already signed in).
« no previous file with comments | « ash/resources/ash_resources.grd ('k') | ash/session_state_delegate_stub.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698