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

Unified Diff: ash/desktop_background/desktop_background_controller.h

Issue 9764012: Restore to user selected wallpaper after browser crash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review and fix a segfault when starting chrome after saving data to local state. Created 8 years, 9 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: ash/desktop_background/desktop_background_controller.h
diff --git a/ash/desktop_background/desktop_background_controller.h b/ash/desktop_background/desktop_background_controller.h
index e6ef4354cfa9771a29f892b613be57b7e730a9a4..891899cfe8735b9e2f32a33ab7eada1c315ff352 100644
--- a/ash/desktop_background/desktop_background_controller.h
+++ b/ash/desktop_background/desktop_background_controller.h
@@ -13,6 +13,14 @@ class SkBitmap;
namespace ash {
+class UserWallpaperDelegate {
+ public:
+ virtual ~UserWallpaperDelegate() {}
+
+ // Gets the index of user selected wallpaper
+ virtual const int GetUserWallpaperIndex() = 0;
+};
+
// A class to listen for login and desktop background change events and set the
// corresponding default wallpaper in Aura shell.
class ASH_EXPORT DesktopBackgroundController {
@@ -31,30 +39,17 @@ class ASH_EXPORT DesktopBackgroundController {
}
// Change the desktop background image to wallpaper with |index|.
- void OnDesktopBackgroundChanged(int index);
+ void OnDesktopBackgroundChanged();
// Sets the desktop background to image mode and create a new background
// widget with |wallpaper|.
void SetDesktopBackgroundImageMode(const SkBitmap& wallpaper);
- // Sets the desktop background to image mode and create a new background
- // widget with default wallpaper.
- void SetDefaultDesktopBackgroundImage();
-
- // Sets the desktop background to image mode and create a new background
- // widget with previous selected wallpaper at run time.
- void SetPreviousDesktopBackgroundImage();
-
// Sets the desktop background to solid color mode and create a solid color
// layout.
void SetDesktopBackgroundSolidColorMode();
private:
- // We need to cache the previously used wallpaper index. So when users switch
- // desktop background color mode at run time, we can directly switch back to
- // the user selected wallpaper in image mode.
- int previous_wallpaper_index_;
-
// Can change at runtime.
BackgroundMode desktop_background_mode_;

Powered by Google App Engine
This is Rietveld 408576698