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

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: James' review 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
11 #include "ash/desktop_background/desktop_background_resources.h" 11 #include "ash/desktop_background/desktop_background_resources.h"
12 #include "base/memory/singleton.h" 12 #include "base/memory/singleton.h"
13 #include "chrome/browser/chromeos/login/user.h" 13 #include "chrome/browser/chromeos/login/user.h"
14 #include "chrome/browser/ui/webui/options2/chromeos/set_wallpaper_options_handle r2.h"
14 15
15 class SkBitmap; 16 class SkBitmap;
16 class FilePath; 17 class FilePath;
17 class PrefService; 18 class PrefService;
18 19
19 namespace chromeos { 20 namespace chromeos {
20 21
21 class RemoveUserDelegate; 22 class RemoveUserDelegate;
22 23
23 // Base class for UserManagerImpl - provides a mechanism for discovering users 24 // Base class for UserManagerImpl - provides a mechanism for discovering users
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 // 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
169 // LOGIN_USER_IMAGE_CHANGED notification and updates Local State. 170 // LOGIN_USER_IMAGE_CHANGED notification and updates Local State.
170 virtual void SaveUserDefaultImageIndex(const std::string& username, 171 virtual void SaveUserDefaultImageIndex(const std::string& username,
171 int image_index) = 0; 172 int image_index) = 0;
172 173
173 // Saves image to file, sends LOGIN_USER_IMAGE_CHANGED notification and 174 // Saves image to file, sends LOGIN_USER_IMAGE_CHANGED notification and
174 // updates Local State. 175 // updates Local State.
175 virtual void SaveUserImage(const std::string& username, 176 virtual void SaveUserImage(const std::string& username,
176 const SkBitmap& image) = 0; 177 const SkBitmap& image) = 0;
177 178
179 // Update custom wallpaper to selected layout and saves layout to Local
flackr 2012/05/09 21:26:16 s/Update/Updates
bshe 2012/05/10 16:10:26 Done.
180 // State.
181 virtual void SetLoggedInUserCustomWallpaperLayout(
182 ash::WallpaperLayout layout) = 0;
183
178 // Tries to load user image from disk; if successful, sets it for the user, 184 // 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. 185 // sends LOGIN_USER_IMAGE_CHANGED notification and updates Local State.
180 virtual void SaveUserImageFromFile(const std::string& username, 186 virtual void SaveUserImageFromFile(const std::string& username,
181 const FilePath& path) = 0; 187 const FilePath& path) = 0;
182 188
189 // Tries to load user image from disk; if successful, sets it for the user,
190 // and updates Local State.
191 virtual void SaveUserWallpaperFromFile(const std::string& username,
192 const FilePath& path,
193 ash::WallpaperLayout layout,
194 WallpaperDelegate* delegate) = 0;
195
183 // Sets profile image as user image for |username|, sends 196 // Sets profile image as user image for |username|, sends
184 // LOGIN_USER_IMAGE_CHANGED notification and updates Local State. If the user 197 // 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 198 // 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 199 // default grey avatar will be used until the user logs in and profile image
187 // is downloaded successfuly. 200 // is downloaded successfuly.
188 virtual void SaveUserImageFromProfileImage(const std::string& username) = 0; 201 virtual void SaveUserImageFromProfileImage(const std::string& username) = 0;
189 202
190 // Starts downloading the profile image for the logged-in user. 203 // Starts downloading the profile image for the logged-in user.
191 // If user's image index is |kProfileImageIndex|, newly downloaded image 204 // If user's image index is |kProfileImageIndex|, newly downloaded image
192 // is immediately set as user's current picture. 205 // is immediately set as user's current picture.
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 virtual void NotifyLocalStateChanged() = 0; 242 virtual void NotifyLocalStateChanged() = 0;
230 243
231 // Returns the result of the last successful profile image download, if any. 244 // Returns the result of the last successful profile image download, if any.
232 // Otherwise, returns an empty bitmap. 245 // Otherwise, returns an empty bitmap.
233 virtual const SkBitmap& DownloadedProfileImage() const = 0; 246 virtual const SkBitmap& DownloadedProfileImage() const = 0;
234 }; 247 };
235 248
236 } // namespace chromeos 249 } // namespace chromeos
237 250
238 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_H_ 251 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698