| 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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 // Sets user image to the default image with index |image_index|, sends | 168 // Sets user image to the default image with index |image_index|, sends |
| 169 // LOGIN_USER_IMAGE_CHANGED notification and updates Local State. | 169 // LOGIN_USER_IMAGE_CHANGED notification and updates Local State. |
| 170 virtual void SaveUserDefaultImageIndex(const std::string& username, | 170 virtual void SaveUserDefaultImageIndex(const std::string& username, |
| 171 int image_index) = 0; | 171 int image_index) = 0; |
| 172 | 172 |
| 173 // Saves image to file, sends LOGIN_USER_IMAGE_CHANGED notification and | 173 // Saves image to file, sends LOGIN_USER_IMAGE_CHANGED notification and |
| 174 // updates Local State. | 174 // updates Local State. |
| 175 virtual void SaveUserImage(const std::string& username, | 175 virtual void SaveUserImage(const std::string& username, |
| 176 const SkBitmap& image) = 0; | 176 const SkBitmap& image) = 0; |
| 177 | 177 |
| 178 // Update custom wallpaper to selected layout and saves layout to Local |
| 179 // State. |
| 180 virtual void SetLoggedInUserCustomWallpaperLayout( |
| 181 ash::WallpaperLayout layout) = 0; |
| 182 |
| 178 // Tries to load user image from disk; if successful, sets it for the user, | 183 // Tries to load user image from disk; if successful, sets it for the user, |
| 179 // sends LOGIN_USER_IMAGE_CHANGED notification and updates Local State. | 184 // sends LOGIN_USER_IMAGE_CHANGED notification and updates Local State. |
| 180 virtual void SaveUserImageFromFile(const std::string& username, | 185 virtual void SaveUserImageFromFile(const std::string& username, |
| 181 const FilePath& path) = 0; | 186 const FilePath& path) = 0; |
| 182 | 187 |
| 188 // Tries to load user image from disk; if successful, sets it for the user, |
| 189 // and updates Local State. |
| 190 virtual void SaveUserWallpaperFromFile(const std::string& username, |
| 191 const FilePath& path, |
| 192 ash::WallpaperLayout layout) = 0; |
| 193 |
| 183 // Sets profile image as user image for |username|, sends | 194 // Sets profile image as user image for |username|, sends |
| 184 // LOGIN_USER_IMAGE_CHANGED notification and updates Local State. If the user | 195 // LOGIN_USER_IMAGE_CHANGED notification and updates Local State. If the user |
| 185 // is not logged-in or the last |DownloadProfileImage| call has failed, a | 196 // is not logged-in or the last |DownloadProfileImage| call has failed, a |
| 186 // default grey avatar will be used until the user logs in and profile image | 197 // default grey avatar will be used until the user logs in and profile image |
| 187 // is downloaded successfuly. | 198 // is downloaded successfuly. |
| 188 virtual void SaveUserImageFromProfileImage(const std::string& username) = 0; | 199 virtual void SaveUserImageFromProfileImage(const std::string& username) = 0; |
| 189 | 200 |
| 190 // Starts downloading the profile image for the logged-in user. | 201 // Starts downloading the profile image for the logged-in user. |
| 191 // If user's image index is |kProfileImageIndex|, newly downloaded image | 202 // If user's image index is |kProfileImageIndex|, newly downloaded image |
| 192 // is immediately set as user's current picture. | 203 // is immediately set as user's current picture. |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 virtual void NotifyLocalStateChanged() = 0; | 240 virtual void NotifyLocalStateChanged() = 0; |
| 230 | 241 |
| 231 // Returns the result of the last successful profile image download, if any. | 242 // Returns the result of the last successful profile image download, if any. |
| 232 // Otherwise, returns an empty bitmap. | 243 // Otherwise, returns an empty bitmap. |
| 233 virtual const SkBitmap& DownloadedProfileImage() const = 0; | 244 virtual const SkBitmap& DownloadedProfileImage() const = 0; |
| 234 }; | 245 }; |
| 235 | 246 |
| 236 } // namespace chromeos | 247 } // namespace chromeos |
| 237 | 248 |
| 238 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_H_ | 249 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_H_ |
| OLD | NEW |