OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_SYSTEM_TRAY_SYSTEM_TRAY_DELEGATE_H_ | 5 #ifndef ASH_SYSTEM_TRAY_SYSTEM_TRAY_DELEGATE_H_ |
6 #define ASH_SYSTEM_TRAY_SYSTEM_TRAY_DELEGATE_H_ | 6 #define ASH_SYSTEM_TRAY_SYSTEM_TRAY_DELEGATE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 std::string id; | 103 std::string id; |
104 base::string16 name; | 104 base::string16 name; |
105 base::string16 medium_name; | 105 base::string16 medium_name; |
106 base::string16 short_name; | 106 base::string16 short_name; |
107 }; | 107 }; |
108 | 108 |
109 typedef std::vector<IMEInfo> IMEInfoList; | 109 typedef std::vector<IMEInfo> IMEInfoList; |
110 | 110 |
111 class VolumeControlDelegate; | 111 class VolumeControlDelegate; |
112 | 112 |
| 113 typedef std::vector<std::string> UserEmailList; |
| 114 |
113 class SystemTrayDelegate { | 115 class SystemTrayDelegate { |
114 public: | 116 public: |
115 virtual ~SystemTrayDelegate() {} | 117 virtual ~SystemTrayDelegate() {} |
116 | 118 |
117 // Called after SystemTray has been instantiated. | 119 // Called after SystemTray has been instantiated. |
118 virtual void Initialize() = 0; | 120 virtual void Initialize() = 0; |
119 | 121 |
120 // Called before SystemTray is destroyed. | 122 // Called before SystemTray is destroyed. |
121 virtual void Shutdown() = 0; | 123 virtual void Shutdown() = 0; |
122 | 124 |
123 // Returns true if system tray should be visible on startup. | 125 // Returns true if system tray should be visible on startup. |
124 virtual bool GetTrayVisibilityOnStartup() = 0; | 126 virtual bool GetTrayVisibilityOnStartup() = 0; |
125 | 127 |
126 // Gets information about the logged in user. | 128 // Gets information about the active user. |
127 virtual const base::string16 GetUserDisplayName() const = 0; | 129 virtual const base::string16 GetUserDisplayName() const = 0; |
128 virtual const std::string GetUserEmail() const = 0; | 130 virtual const std::string GetUserEmail() const = 0; |
129 virtual const gfx::ImageSkia& GetUserImage() const = 0; | 131 virtual const gfx::ImageSkia& GetUserImage() const = 0; |
130 virtual user::LoginStatus GetUserLoginStatus() const = 0; | 132 virtual user::LoginStatus GetUserLoginStatus() const = 0; |
131 virtual bool IsOobeCompleted() const = 0; | 133 virtual bool IsOobeCompleted() const = 0; |
132 | 134 |
| 135 // Returns a list of all logged in users. |
| 136 virtual void GetLoggedInUsers(UserEmailList* users) = 0; |
| 137 |
| 138 // Switches to another active user (if that user has already signed in). |
| 139 virtual void SwitchActiveUser(const std::string& email) = 0; |
| 140 |
133 // Shows UI for changing user's profile picture. | 141 // Shows UI for changing user's profile picture. |
134 virtual void ChangeProfilePicture() = 0; | 142 virtual void ChangeProfilePicture() = 0; |
135 | 143 |
136 // Returns the domain that manages the device, if it is enterprise-enrolled. | 144 // Returns the domain that manages the device, if it is enterprise-enrolled. |
137 virtual const std::string GetEnterpriseDomain() const = 0; | 145 virtual const std::string GetEnterpriseDomain() const = 0; |
138 | 146 |
139 // Returns notification for enterprise enrolled devices. | 147 // Returns notification for enterprise enrolled devices. |
140 virtual const base::string16 GetEnterpriseMessage() const = 0; | 148 virtual const base::string16 GetEnterpriseMessage() const = 0; |
141 | 149 |
142 // Returns whether a system upgrade is available. | 150 // Returns whether a system upgrade is available. |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 | 185 |
178 // Show accessilibity help. | 186 // Show accessilibity help. |
179 virtual void ShowAccessibilityHelp() = 0; | 187 virtual void ShowAccessibilityHelp() = 0; |
180 | 188 |
181 // Shows more information about public account mode. | 189 // Shows more information about public account mode. |
182 virtual void ShowPublicAccountInfo() = 0; | 190 virtual void ShowPublicAccountInfo() = 0; |
183 | 191 |
184 // Shows information about enterprise enrolled devices. | 192 // Shows information about enterprise enrolled devices. |
185 virtual void ShowEnterpriseInfo() = 0; | 193 virtual void ShowEnterpriseInfo() = 0; |
186 | 194 |
| 195 // Shows login UI to add other users to this session. |
| 196 virtual void ShowUserLogin() = 0; |
| 197 |
187 // Attempts to shut down the system. | 198 // Attempts to shut down the system. |
188 virtual void ShutDown() = 0; | 199 virtual void ShutDown() = 0; |
189 | 200 |
190 // Attempts to sign out the user. | 201 // Attempts to sign out the user. |
191 virtual void SignOut() = 0; | 202 virtual void SignOut() = 0; |
192 | 203 |
193 // Attempts to lock the screen. | 204 // Attempts to lock the screen. |
194 virtual void RequestLockScreen() = 0; | 205 virtual void RequestLockScreen() = 0; |
195 | 206 |
196 // Attempts to restart the system. | 207 // Attempts to restart the system. |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 // Speaks the given text if spoken feedback is enabled. | 362 // Speaks the given text if spoken feedback is enabled. |
352 virtual void MaybeSpeak(const std::string& utterance) const = 0; | 363 virtual void MaybeSpeak(const std::string& utterance) const = 0; |
353 | 364 |
354 // Creates a dummy delegate for testing. | 365 // Creates a dummy delegate for testing. |
355 static SystemTrayDelegate* CreateDummyDelegate(); | 366 static SystemTrayDelegate* CreateDummyDelegate(); |
356 }; | 367 }; |
357 | 368 |
358 } // namespace ash | 369 } // namespace ash |
359 | 370 |
360 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_DELEGATE_H_ | 371 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_DELEGATE_H_ |
OLD | NEW |