Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(556)

Side by Side Diff: chrome/browser/chromeos/login/user_manager.h

Issue 10375010: Implement user selected wallpaper feature. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 // Sets user image to the default image with index |image_index|, sends 161 // Sets user image to the default image with index |image_index|, sends
162 // LOGIN_USER_IMAGE_CHANGED notification and updates Local State. 162 // LOGIN_USER_IMAGE_CHANGED notification and updates Local State.
163 virtual void SaveUserDefaultImageIndex(const std::string& username, 163 virtual void SaveUserDefaultImageIndex(const std::string& username,
164 int image_index) = 0; 164 int image_index) = 0;
165 165
166 // Saves image to file, sends LOGIN_USER_IMAGE_CHANGED notification and 166 // Saves image to file, sends LOGIN_USER_IMAGE_CHANGED notification and
167 // updates Local State. 167 // updates Local State.
168 virtual void SaveUserImage(const std::string& username, 168 virtual void SaveUserImage(const std::string& username,
169 const SkBitmap& image) = 0; 169 const SkBitmap& image) = 0;
170 170
171 // Update custom wallpaper to selected layout and saves layout to Local
172 // State.
173 virtual void SetLoggedInUserCustomWallpaperLayout(
174 ash::WallpaperLayout layout) = 0;
175
171 // Tries to load user image from disk; if successful, sets it for the user, 176 // Tries to load user image from disk; if successful, sets it for the user,
172 // sends LOGIN_USER_IMAGE_CHANGED notification and updates Local State. 177 // sends LOGIN_USER_IMAGE_CHANGED notification and updates Local State.
173 virtual void SaveUserImageFromFile(const std::string& username, 178 virtual void SaveUserImageFromFile(const std::string& username,
174 const FilePath& path) = 0; 179 const FilePath& path) = 0;
175 180
181 // Tries to load user image from disk; if successful, sets it for the user,
182 // and updates Local State.
183 virtual void SaveUserWallpaperFromFile(const std::string& username,
184 const FilePath& path,
185 ash::WallpaperLayout layout) = 0;
186
176 // Sets profile image as user image for |username|, sends 187 // Sets profile image as user image for |username|, sends
177 // LOGIN_USER_IMAGE_CHANGED notification and updates Local State. If the user 188 // LOGIN_USER_IMAGE_CHANGED notification and updates Local State. If the user
178 // is not logged-in or the last |DownloadProfileImage| call has failed, a 189 // is not logged-in or the last |DownloadProfileImage| call has failed, a
179 // default grey avatar will be used until the user logs in and profile image 190 // default grey avatar will be used until the user logs in and profile image
180 // is downloaded successfuly. 191 // is downloaded successfuly.
181 virtual void SaveUserImageFromProfileImage(const std::string& username) = 0; 192 virtual void SaveUserImageFromProfileImage(const std::string& username) = 0;
182 193
183 // Starts downloading the profile image for the logged-in user. 194 // Starts downloading the profile image for the logged-in user.
184 // If user's image index is |kProfileImageIndex|, newly downloaded image 195 // If user's image index is |kProfileImageIndex|, newly downloaded image
185 // is immediately set as user's current picture. 196 // is immediately set as user's current picture.
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 virtual void NotifyLocalStateChanged() = 0; 228 virtual void NotifyLocalStateChanged() = 0;
218 229
219 // Returns the result of the last successful profile image download, if any. 230 // Returns the result of the last successful profile image download, if any.
220 // Otherwise, returns an empty bitmap. 231 // Otherwise, returns an empty bitmap.
221 virtual const SkBitmap& DownloadedProfileImage() const = 0; 232 virtual const SkBitmap& DownloadedProfileImage() const = 0;
222 }; 233 };
223 234
224 } // namespace chromeos 235 } // namespace chromeos
225 236
226 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_H_ 237 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698