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

Unified Diff: chrome/browser/chromeos/login/wallpaper_manager.h

Issue 10815047: Save user selected wallpaper information to local state. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: format nits Created 8 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/login/wallpaper_manager.h
diff --git a/chrome/browser/chromeos/login/wallpaper_manager.h b/chrome/browser/chromeos/login/wallpaper_manager.h
index 50fce515f4a9f4d17deefd2a4e56983c1861dbce..450d718567cb17da6430742ecb8b0fac34d158a1 100644
--- a/chrome/browser/chromeos/login/wallpaper_manager.h
+++ b/chrome/browser/chromeos/login/wallpaper_manager.h
@@ -10,12 +10,15 @@
#include "ash/desktop_background/desktop_background_resources.h"
#include "base/memory/scoped_ptr.h"
#include "base/timer.h"
+#include "chrome/browser/chromeos/login/user.h"
#include "chrome/browser/chromeos/login/user_image.h"
#include "chrome/browser/chromeos/login/user_image_loader.h"
#include "chrome/browser/chromeos/power/resume_observer.h"
#include "chrome/browser/chromeos/system/timezone_settings.h"
#include "unicode/timezone.h"
+class PrefService;
+
namespace chromeos {
// This class maintains wallpapers for users who have logged into this Chrome
@@ -27,6 +30,9 @@ class WallpaperManager: public system::TimezoneSettings::Observer,
WallpaperManager();
+ // Registers wallpaper manager preferences.
+ static void RegisterPrefs(PrefService* local_state);
+
// Adds PowerManagerClient observer. It needs to be added after
// PowerManagerClient initialized.
void AddPowerManagerClientObserver();
@@ -35,13 +41,22 @@ class WallpaperManager: public system::TimezoneSettings::Observer,
// Cancel any previous timer if any.
void RestartTimer();
+ // Saves |username| selected wallpaper information to local state.
+ void SaveUserWallpaperInfo(const std::string& username,
+ const std::string& file_name,
+ ash::WallpaperLayout layout,
+ User::WallpaperType type);
+
// Sets last selected user on user pod row.
void SetLastSelectedUser(const std::string& last_selected_user);
// Sets wallpaper to the image file |path| points to.
- void SetWallpaperFromFile(std::string email,
- const std::string& path,
- ash::WallpaperLayout layout);
+ void SetWallpaperFromFilePath(const std::string& path,
+ ash::WallpaperLayout layout);
+
+ // Sets wallpaper to |wallpaper|.
+ void SetWallpaperFromImageSkia(const gfx::ImageSkia& wallpaper,
+ ash::WallpaperLayout layout);
// User was deselected at login screen, reset wallpaper if needed.
void UserDeselected();
@@ -58,6 +73,10 @@ class WallpaperManager: public system::TimezoneSettings::Observer,
// at 0am if chromeos device is on.
void BatchUpdateWallpaper();
+ // Sets wallpaper to image in |user_image| with |layout|.
+ void OnWallpaperLoaded(ash::WallpaperLayout layout,
+ const UserImage& user_image);
+
// Loads user image from its file.
scoped_refptr<UserImageLoader> image_loader_;
« no previous file with comments | « chrome/browser/chromeos/extensions/wallpaper_private_api.cc ('k') | chrome/browser/chromeos/login/wallpaper_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698