summaryrefslogtreecommitdiffstats
path: root/ash/desktop_background
diff options
context:
space:
mode:
authorbshe@chromium.org <bshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-08 18:06:10 +0000
committerbshe@chromium.org <bshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-08 18:06:10 +0000
commit265757f1882cb3224539ef748f997d2b13688ef5 (patch)
tree4550cd09f8143763407a038a22ba080ecd6e6a2b /ash/desktop_background
parent147435848829f4d68d0b76bf94034d5f8944eb70 (diff)
downloadchromium_src-265757f1882cb3224539ef748f997d2b13688ef5.zip
chromium_src-265757f1882cb3224539ef748f997d2b13688ef5.tar.gz
chromium_src-265757f1882cb3224539ef748f997d2b13688ef5.tar.bz2
Generate custom wallpaper thumbnail and restructure file directory of custom wallpapers
The CL did the following: 1. Create custom_wallpapers directory in USER_DATA_DIR 2. Generates a thumbnail of custom wallpaper and saves it to custom_wallpapers/thumbnail 3. Save large and small resolution custom wallpapers to custom_wallpapers/large|small if necessary 4. Save original images to custom_wallpapers/original as fallback. 5. Migrate old custom wallpapers to new places 6. Added test for the migration BUG=162563 Review URL: https://chromiumcodereview.appspot.com/12084057 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181516 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/desktop_background')
-rw-r--r--ash/desktop_background/desktop_background_controller.cc2
-rw-r--r--ash/desktop_background/desktop_background_controller.h4
2 files changed, 6 insertions, 0 deletions
diff --git a/ash/desktop_background/desktop_background_controller.cc b/ash/desktop_background/desktop_background_controller.cc
index 2a72b22..4e64345 100644
--- a/ash/desktop_background/desktop_background_controller.cc
+++ b/ash/desktop_background/desktop_background_controller.cc
@@ -66,6 +66,8 @@ const int kSmallWallpaperMaxWidth = 1366;
const int kSmallWallpaperMaxHeight = 800;
const int kLargeWallpaperMaxWidth = 2560;
const int kLargeWallpaperMaxHeight = 1700;
+const int kWallpaperThumbnailWidth = 108;
+const int kWallpaperThumbnailHeight = 68;
// Stores the current wallpaper data.
struct DesktopBackgroundController::WallpaperData {
diff --git a/ash/desktop_background/desktop_background_controller.h b/ash/desktop_background/desktop_background_controller.h
index 9933c63..2820062 100644
--- a/ash/desktop_background/desktop_background_controller.h
+++ b/ash/desktop_background/desktop_background_controller.h
@@ -57,6 +57,10 @@ ASH_EXPORT extern const int kSmallWallpaperMaxHeight;
ASH_EXPORT extern const int kLargeWallpaperMaxWidth;
ASH_EXPORT extern const int kLargeWallpaperMaxHeight;
+// The width and heigh of wallpaper thumbnails.
+ASH_EXPORT extern const int kWallpaperThumbnailWidth;
+ASH_EXPORT extern const int kWallpaperThumbnailHeight;
+
class DesktopBackgroundControllerObserver;
// Loads selected desktop wallpaper from file system asynchronously and updates