| 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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 // Ignored If there is no such user. | 129 // Ignored If there is no such user. |
| 130 virtual void SaveUserDisplayEmail(const std::string& username, | 130 virtual void SaveUserDisplayEmail(const std::string& username, |
| 131 const std::string& display_email) = 0; | 131 const std::string& display_email) = 0; |
| 132 | 132 |
| 133 // Returns the display email for user |username| if it is known (was | 133 // Returns the display email for user |username| if it is known (was |
| 134 // previously set by a |SaveUserDisplayEmail| call). | 134 // previously set by a |SaveUserDisplayEmail| call). |
| 135 // Otherwise, returns |username| itself. | 135 // Otherwise, returns |username| itself. |
| 136 virtual std::string GetUserDisplayEmail( | 136 virtual std::string GetUserDisplayEmail( |
| 137 const std::string& username) const = 0; | 137 const std::string& username) const = 0; |
| 138 | 138 |
| 139 // Returns the index of the default wallpapers saved in local state for user | 139 // Returns the index of the default wallpapers saved in local state for login |
| 140 // |username| if it is known (was previousely set by | 140 // user if it is known (was previousely set by |SaveWallpaperToLocalState| |
| 141 // |SaveWallpaperToLocalState| call). | 141 // call). Otherwise, returns a randomly generated index. |
| 142 // Otherwise, returns default wallpaper index. | 142 virtual int GetUserWallpaperIndex() = 0; |
| 143 virtual int GetUserWallpaper(const std::string& username) = 0; | |
| 144 | 143 |
| 145 // Sets user wallpaper to the default wallpaper with index |wallpaper_index|, | 144 // Save the index |wallpaper_index| of the default wallpapers selected by |
| 146 // updates Local State. | 145 // current user to Local State. |
| 147 virtual void SaveWallpaperDefaultIndex(const std::string& username, | 146 virtual void SaveUserWallpaperIndex(int wallpaper_index) = 0; |
| 148 int wallpaper_index) = 0; | |
| 149 | 147 |
| 150 // Sets user image to the default image with index |image_index|, sends | 148 // Sets user image to the default image with index |image_index|, sends |
| 151 // LOGIN_USER_IMAGE_CHANGED notification and updates Local State. | 149 // LOGIN_USER_IMAGE_CHANGED notification and updates Local State. |
| 152 virtual void SaveUserDefaultImageIndex(const std::string& username, | 150 virtual void SaveUserDefaultImageIndex(const std::string& username, |
| 153 int image_index) = 0; | 151 int image_index) = 0; |
| 154 | 152 |
| 155 // Saves image to file, sends LOGIN_USER_IMAGE_CHANGED notification and | 153 // Saves image to file, sends LOGIN_USER_IMAGE_CHANGED notification and |
| 156 // updates Local State. | 154 // updates Local State. |
| 157 virtual void SaveUserImage(const std::string& username, | 155 virtual void SaveUserImage(const std::string& username, |
| 158 const SkBitmap& image) = 0; | 156 const SkBitmap& image) = 0; |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 virtual void NotifyLocalStateChanged() = 0; | 201 virtual void NotifyLocalStateChanged() = 0; |
| 204 | 202 |
| 205 // Returns the result of the last successful profile image download, if any. | 203 // Returns the result of the last successful profile image download, if any. |
| 206 // Otherwise, returns an empty bitmap. | 204 // Otherwise, returns an empty bitmap. |
| 207 virtual const SkBitmap& DownloadedProfileImage() const = 0; | 205 virtual const SkBitmap& DownloadedProfileImage() const = 0; |
| 208 }; | 206 }; |
| 209 | 207 |
| 210 } // namespace chromeos | 208 } // namespace chromeos |
| 211 | 209 |
| 212 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_H_ | 210 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_H_ |
| OLD | NEW |