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

Unified Diff: ash/test/test_user_wallpaper_delegate.cc

Issue 81393004: ash: Avoid reloading already-resized custom wallpaper. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add another MakeThreadSafe() call to WallpaperResizer 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
Index: ash/test/test_user_wallpaper_delegate.cc
diff --git a/ash/test/test_user_wallpaper_delegate.cc b/ash/test/test_user_wallpaper_delegate.cc
index c3eb16e49b71fc89ecfb0ade6dcb0b586688435f..4cef29b68cc36edc4ad6a414e8101fb691d18967 100644
--- a/ash/test/test_user_wallpaper_delegate.cc
+++ b/ash/test/test_user_wallpaper_delegate.cc
@@ -4,11 +4,23 @@
#include "ash/test/test_user_wallpaper_delegate.h"
+#include "ash/desktop_background/desktop_background_controller.h"
+#include "ash/shell.h"
+
namespace ash {
namespace test {
+TestUserWallpaperDelegate::TestUserWallpaperDelegate()
+ : update_wallpaper_count_(0) {}
+
+TestUserWallpaperDelegate::~TestUserWallpaperDelegate() {}
+
void TestUserWallpaperDelegate::UpdateWallpaper() {
DefaultUserWallpaperDelegate::UpdateWallpaper();
+ if (!custom_wallpaper_.isNull()) {
+ Shell::GetInstance()->desktop_background_controller()->SetCustomWallpaper(
+ custom_wallpaper_, WALLPAPER_LAYOUT_STRETCH);
+ }
update_wallpaper_count_ ++;
}
« ash/desktop_background/wallpaper_resizer.cc ('K') | « ash/test/test_user_wallpaper_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698