summaryrefslogtreecommitdiffstats
path: root/ash/desktop_background/wallpaper_resizer.h
diff options
context:
space:
mode:
authoralemate@chromium.org <alemate@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-09 23:53:07 +0000
committeralemate@chromium.org <alemate@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-09 23:53:07 +0000
commit3f4c26ecd470540a43b9d422408aad64e3fedf96 (patch)
treee504b8820bffcc2a4d103bfdb6030666e0f00b5c /ash/desktop_background/wallpaper_resizer.h
parent19db94feaaa7e875d09ac8022e88aee455b88887 (diff)
downloadchromium_src-3f4c26ecd470540a43b9d422408aad64e3fedf96.zip
chromium_src-3f4c26ecd470540a43b9d422408aad64e3fedf96.tar.gz
chromium_src-3f4c26ecd470540a43b9d422408aad64e3fedf96.tar.bz2
Move all wallpaper file loading and decoding from DesktopBackgroundController to WallpaperManager.
To simplify DesktopBackgroundController and allow customized default wallpapers, we need to move all "default" wallpaper loading to WallpaperManager. BUG=348136 TEST=unittests Review URL: https://codereview.chromium.org/215293003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@262862 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/desktop_background/wallpaper_resizer.h')
-rw-r--r--ash/desktop_background/wallpaper_resizer.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/ash/desktop_background/wallpaper_resizer.h b/ash/desktop_background/wallpaper_resizer.h
index fadfb44..2b867994 100644
--- a/ash/desktop_background/wallpaper_resizer.h
+++ b/ash/desktop_background/wallpaper_resizer.h
@@ -18,6 +18,8 @@ namespace ash {
class WallpaperResizerObserver;
+extern const int kInvalidResourceID;
+
// Stores the current wallpaper data and resize it to |target_size| if needed.
class ASH_EXPORT WallpaperResizer {
public:
@@ -40,6 +42,8 @@ class ASH_EXPORT WallpaperResizer {
uint32_t original_image_id() const { return original_image_id_; }
WallpaperLayout layout() const { return layout_; }
+ int resource_id() const { return resource_id_; }
+
// Called on the UI thread to run Resize() on the worker pool and post an
// OnResizeFinished() task back to the UI thread on completion.
void StartResize();
@@ -63,6 +67,9 @@ class ASH_EXPORT WallpaperResizer {
// Unique identifier corresponding to the original (i.e. pre-resize) |image_|.
uint32_t original_image_id_;
+ // kInvalidResourceID if image was not obtained from resources.
+ const int resource_id_;
+
gfx::Size target_size_;
WallpaperLayout layout_;