| 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 CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 | 94 |
| 95 // Indicates that user just logged on as the demo user. | 95 // Indicates that user just logged on as the demo user. |
| 96 virtual void DemoUserLoggedIn() = 0; | 96 virtual void DemoUserLoggedIn() = 0; |
| 97 | 97 |
| 98 // Indicates that user just started incognito session. | 98 // Indicates that user just started incognito session. |
| 99 virtual void GuestUserLoggedIn() = 0; | 99 virtual void GuestUserLoggedIn() = 0; |
| 100 | 100 |
| 101 // Indicates that a user just logged in as ephemeral. | 101 // Indicates that a user just logged in as ephemeral. |
| 102 virtual void EphemeralUserLoggedIn(const std::string& email) = 0; | 102 virtual void EphemeralUserLoggedIn(const std::string& email) = 0; |
| 103 | 103 |
| 104 // Loads logged in user wallpaper asynchronously and sets to current wallpaper |
| 105 // after loaded. If not logged in or logged in as stub user, uses an empty |
| 106 // wallpaper. |
| 107 virtual void SetLoggedInUserWallpaper() = 0; |
| 108 |
| 104 // Called when user pod with |email| is selected. | 109 // Called when user pod with |email| is selected. |
| 105 virtual void UserSelected(const std::string& email) = 0; | 110 virtual void UserSelected(const std::string& email) = 0; |
| 106 | 111 |
| 107 // Called when browser session is started i.e. after | 112 // Called when browser session is started i.e. after |
| 108 // browser_creator.LaunchBrowser(...) was called after user sign in. | 113 // browser_creator.LaunchBrowser(...) was called after user sign in. |
| 109 // When user is at the image screen IsUserLoggedIn() will return true | 114 // When user is at the image screen IsUserLoggedIn() will return true |
| 110 // but SessionStarted() will return false. | 115 // but SessionStarted() will return false. |
| 111 // Fires NOTIFICATION_SESSION_STARTED. | 116 // Fires NOTIFICATION_SESSION_STARTED. |
| 112 virtual void SessionStarted() = 0; | 117 virtual void SessionStarted() = 0; |
| 113 | 118 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 // Ignored If there is no such user. | 150 // Ignored If there is no such user. |
| 146 virtual void SaveUserDisplayEmail(const std::string& username, | 151 virtual void SaveUserDisplayEmail(const std::string& username, |
| 147 const std::string& display_email) = 0; | 152 const std::string& display_email) = 0; |
| 148 | 153 |
| 149 // Returns the display email for user |username| if it is known (was | 154 // Returns the display email for user |username| if it is known (was |
| 150 // previously set by a |SaveUserDisplayEmail| call). | 155 // previously set by a |SaveUserDisplayEmail| call). |
| 151 // Otherwise, returns |username| itself. | 156 // Otherwise, returns |username| itself. |
| 152 virtual std::string GetUserDisplayEmail( | 157 virtual std::string GetUserDisplayEmail( |
| 153 const std::string& username) const = 0; | 158 const std::string& username) const = 0; |
| 154 | 159 |
| 155 // Returns the index of the default wallpapers saved in local state for login | |
| 156 // user if it is known (was previously set by |SaveWallpaperToLocalState| | |
| 157 // call). Otherwise, returns the default wallpaper index. | |
| 158 virtual int GetLoggedInUserWallpaperIndex() = 0; | |
| 159 | |
| 160 // Sets |type| and |index| to the value saved in local state for logged in | 160 // Sets |type| and |index| to the value saved in local state for logged in |
| 161 // user. | 161 // user. |
| 162 virtual void GetLoggedInUserWallpaperProperties(User::WallpaperType* type, | 162 virtual void GetLoggedInUserWallpaperProperties(User::WallpaperType* type, |
| 163 int* index) = 0; | 163 int* index) = 0; |
| 164 | 164 |
| 165 // Saves |type| and |index| chose by logged in user to Local State. | 165 // Saves |type| and |index| chose by logged in user to Local State. |
| 166 virtual void SaveLoggedInUserWallpaperProperties(User::WallpaperType type, | 166 virtual void SaveLoggedInUserWallpaperProperties(User::WallpaperType type, |
| 167 int index) = 0; | 167 int index) = 0; |
| 168 | 168 |
| 169 // Sets user image to the default image with index |image_index|, sends | 169 // Sets user image to the default image with index |image_index|, sends |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 virtual void NotifyLocalStateChanged() = 0; | 239 virtual void NotifyLocalStateChanged() = 0; |
| 240 | 240 |
| 241 // Returns the result of the last successful profile image download, if any. | 241 // Returns the result of the last successful profile image download, if any. |
| 242 // Otherwise, returns an empty bitmap. | 242 // Otherwise, returns an empty bitmap. |
| 243 virtual const SkBitmap& DownloadedProfileImage() const = 0; | 243 virtual const SkBitmap& DownloadedProfileImage() const = 0; |
| 244 }; | 244 }; |
| 245 | 245 |
| 246 } // namespace chromeos | 246 } // namespace chromeos |
| 247 | 247 |
| 248 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_H_ | 248 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_H_ |
| OLD | NEW |