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

Side by Side Diff: ash/session/session_state_delegate.h

Issue 1165323004: We should use UserID object to identify users instead of username. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef ASH_SESSION_SESSION_STATE_DELEGATE_H_ 5 #ifndef ASH_SESSION_SESSION_STATE_DELEGATE_H_
6 #define ASH_SESSION_SESSION_STATE_DELEGATE_H_ 6 #define ASH_SESSION_SESSION_STATE_DELEGATE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "ash/ash_export.h" 11 #include "ash/ash_export.h"
12 #include "base/strings/string16.h" 12 #include "base/strings/string16.h"
13 13
14 namespace aura { 14 namespace aura {
15 class Window; 15 class Window;
16 } // namespace aura 16 } // namespace aura
17 17
18 namespace content { 18 namespace content {
19 class BrowserContext; 19 class BrowserContext;
20 } 20 }
21 21
22 namespace gfx { 22 namespace gfx {
23 class ImageSkia; 23 class ImageSkia;
24 } // namespace gfx 24 } // namespace gfx
25 25
26 namespace user_manager { 26 namespace user_manager {
27 class UserInfo; 27 class UserInfo;
28 class UserID;
28 } // namespace user_manager 29 } // namespace user_manager
29 30
30 namespace ash { 31 namespace ash {
31 32
32 class SessionStateObserver; 33 class SessionStateObserver;
33 34
34 // The index for the multi-profile item to use. The list is always LRU sorted 35 // The index for the multi-profile item to use. The list is always LRU sorted
35 // So that the index #0 is the currently active user. 36 // So that the index #0 is the currently active user.
36 typedef int MultiProfileIndex; 37 typedef int MultiProfileIndex;
37 38
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 138
138 // Gets the avatar image for the user associated with the |context|. 139 // Gets the avatar image for the user associated with the |context|.
139 virtual const user_manager::UserInfo* GetUserInfo( 140 virtual const user_manager::UserInfo* GetUserInfo(
140 content::BrowserContext* context) const = 0; 141 content::BrowserContext* context) const = 0;
141 142
142 // Whether or not the window's title should show the avatar. 143 // Whether or not the window's title should show the avatar.
143 virtual bool ShouldShowAvatar(aura::Window* window) const = 0; 144 virtual bool ShouldShowAvatar(aura::Window* window) const = 0;
144 145
145 // Switches to another active user with |user_id| 146 // Switches to another active user with |user_id|
146 // (if that user has already signed in). 147 // (if that user has already signed in).
147 virtual void SwitchActiveUser(const std::string& user_id) = 0; 148 virtual void SwitchActiveUser(const user_manager::UserID& user_id) = 0;
148 149
149 // Switches the active user to the next or previous user, with the same 150 // Switches the active user to the next or previous user, with the same
150 // ordering as GetLoggedInUsers. 151 // ordering as GetLoggedInUsers.
151 virtual void CycleActiveUser(CycleUser cycle_user) = 0; 152 virtual void CycleActiveUser(CycleUser cycle_user) = 0;
152 153
153 // Returns true if primary user policy does not forbid multiple signin. 154 // Returns true if primary user policy does not forbid multiple signin.
154 virtual bool IsMultiProfileAllowedByPrimaryUserPolicy() const = 0; 155 virtual bool IsMultiProfileAllowedByPrimaryUserPolicy() const = 0;
155 156
156 // Adds or removes sessions state observer. 157 // Adds or removes sessions state observer.
157 virtual void AddSessionStateObserver(SessionStateObserver* observer) = 0; 158 virtual void AddSessionStateObserver(SessionStateObserver* observer) = 0;
158 virtual void RemoveSessionStateObserver(SessionStateObserver* observer) = 0; 159 virtual void RemoveSessionStateObserver(SessionStateObserver* observer) = 0;
159 160
160 bool IsInSecondaryLoginScreen() const; 161 bool IsInSecondaryLoginScreen() const;
161 }; 162 };
162 163
163 } // namespace ash 164 } // namespace ash
164 165
165 #endif // ASH_SESSION_SESSION_STATE_DELEGATE_H_ 166 #endif // ASH_SESSION_SESSION_STATE_DELEGATE_H_
OLDNEW
« no previous file with comments | « no previous file | ash/session/session_state_observer.h » ('j') | ash/test/test_session_state_delegate.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698