OLD | NEW |
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_STATE_DELEGATE_H_ | 5 #ifndef ASH_SESSION_STATE_DELEGATE_H_ |
6 #define ASH_SESSION_STATE_DELEGATE_H_ | 6 #define ASH_SESSION_STATE_DELEGATE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 // Returns |true| if user session blocked by some overlying UI. It can be | 87 // Returns |true| if user session blocked by some overlying UI. It can be |
88 // login screen, lock screen or screen for adding users into multi-profile | 88 // login screen, lock screen or screen for adding users into multi-profile |
89 // session. | 89 // session. |
90 virtual bool IsUserSessionBlocked() const = 0; | 90 virtual bool IsUserSessionBlocked() const = 0; |
91 | 91 |
92 // Gets the displayed name for the user with the given |index|. | 92 // Gets the displayed name for the user with the given |index|. |
93 // Note that |index| can at maximum be |NumberOfLoggedInUsers() - 1|. | 93 // Note that |index| can at maximum be |NumberOfLoggedInUsers() - 1|. |
94 virtual const base::string16 GetUserDisplayName( | 94 virtual const base::string16 GetUserDisplayName( |
95 MultiProfileIndex index) const = 0; | 95 MultiProfileIndex index) const = 0; |
96 | 96 |
| 97 // Gets the given name of the user with |index|. An empty string can be |
| 98 // returned if the given name of the user is unknown. |
| 99 // Note that |index| can at maximum be |NumberOfLoggedInUsers() - 1|. |
| 100 virtual const base::string16 GetUserGivenName( |
| 101 MultiProfileIndex index) const = 0; |
| 102 |
97 // Gets the display email address for the user with the given |index|. | 103 // Gets the display email address for the user with the given |index|. |
98 // The display email address might contains some periods in the email name | 104 // The display email address might contains some periods in the email name |
99 // as well as capitalized letters. For example: "Foo.Bar@mock.com". | 105 // as well as capitalized letters. For example: "Foo.Bar@mock.com". |
100 // Note that |index| can at maximum be |NumberOfLoggedInUsers() - 1|. | 106 // Note that |index| can at maximum be |NumberOfLoggedInUsers() - 1|. |
101 virtual const std::string GetUserEmail(MultiProfileIndex index) const = 0; | 107 virtual const std::string GetUserEmail(MultiProfileIndex index) const = 0; |
102 | 108 |
103 // Gets the user id (sanitized email address) for the user with the given | 109 // Gets the user id (sanitized email address) for the user with the given |
104 // |index|. The function would return something like "foobar@mock.com". | 110 // |index|. The function would return something like "foobar@mock.com". |
105 // Note that |index| can at maximum be |NumberOfLoggedInUsers() - 1|. | 111 // Note that |index| can at maximum be |NumberOfLoggedInUsers() - 1|. |
106 virtual const std::string GetUserID(MultiProfileIndex index) const = 0; | 112 virtual const std::string GetUserID(MultiProfileIndex index) const = 0; |
(...skipping 14 matching lines...) Expand all Loading... |
121 virtual void CycleActiveUser(CycleUser cycle_user) = 0; | 127 virtual void CycleActiveUser(CycleUser cycle_user) = 0; |
122 | 128 |
123 // Adds or removes sessions state observer. | 129 // Adds or removes sessions state observer. |
124 virtual void AddSessionStateObserver(SessionStateObserver* observer) = 0; | 130 virtual void AddSessionStateObserver(SessionStateObserver* observer) = 0; |
125 virtual void RemoveSessionStateObserver(SessionStateObserver* observer) = 0; | 131 virtual void RemoveSessionStateObserver(SessionStateObserver* observer) = 0; |
126 }; | 132 }; |
127 | 133 |
128 } // namespace ash | 134 } // namespace ash |
129 | 135 |
130 #endif // ASH_SESSION_STATE_DELEGATE_H_ | 136 #endif // ASH_SESSION_STATE_DELEGATE_H_ |
OLD | NEW |