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

Unified Diff: ash/test/test_user_wallpaper_delegate.h

Issue 81393004: ash: Avoid reloading already-resized custom wallpaper. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: style fix Created 7 years, 1 month 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
« no previous file with comments | « ash/desktop_background/wallpaper_resizer_unittest.cc ('k') | ash/test/test_user_wallpaper_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/test/test_user_wallpaper_delegate.h
diff --git a/ash/test/test_user_wallpaper_delegate.h b/ash/test/test_user_wallpaper_delegate.h
index 56842357d75a85cff869c4aaa08bebd8a72aae7a..83c25838eda7b2fa34b7c026159356f006a944cf 100644
--- a/ash/test/test_user_wallpaper_delegate.h
+++ b/ash/test/test_user_wallpaper_delegate.h
@@ -7,22 +7,33 @@
#include "ash/default_user_wallpaper_delegate.h"
+#include "ui/gfx/image/image_skia.h"
+
namespace ash {
namespace test {
class TestUserWallpaperDelegate : public DefaultUserWallpaperDelegate {
public:
- TestUserWallpaperDelegate() : update_wallpaper_count_(0) {}
- virtual ~TestUserWallpaperDelegate() {}
+ TestUserWallpaperDelegate();
+ virtual ~TestUserWallpaperDelegate();
+
+ void set_custom_wallpaper(const gfx::ImageSkia& wallpaper) {
+ custom_wallpaper_ = wallpaper;
+ }
// DefaultUserWallpaperDelegate overrides:
virtual void UpdateWallpaper() OVERRIDE;
+ // Returns and clears |update_wallpaper_count_|.
int GetUpdateWallpaperCountAndReset();
private:
+ // Number of times that UpdateWallpaper() has been called.
int update_wallpaper_count_;
+ // If non-null, used as custom wallpaper by UpdateWallpaper().
+ gfx::ImageSkia custom_wallpaper_;
+
DISALLOW_COPY_AND_ASSIGN(TestUserWallpaperDelegate);
};
« no previous file with comments | « ash/desktop_background/wallpaper_resizer_unittest.cc ('k') | ash/test/test_user_wallpaper_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698