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

Side by Side 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: style fix Created 7 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/test/test_user_wallpaper_delegate.h" 5 #include "ash/test/test_user_wallpaper_delegate.h"
6 6
7 #include "ash/desktop_background/desktop_background_controller.h"
8 #include "ash/shell.h"
9
7 namespace ash { 10 namespace ash {
8 namespace test { 11 namespace test {
9 12
13 TestUserWallpaperDelegate::TestUserWallpaperDelegate()
14 : update_wallpaper_count_(0) {}
15
16 TestUserWallpaperDelegate::~TestUserWallpaperDelegate() {}
17
10 void TestUserWallpaperDelegate::UpdateWallpaper() { 18 void TestUserWallpaperDelegate::UpdateWallpaper() {
11 DefaultUserWallpaperDelegate::UpdateWallpaper(); 19 DefaultUserWallpaperDelegate::UpdateWallpaper();
20 if (!custom_wallpaper_.isNull()) {
21 Shell::GetInstance()->desktop_background_controller()->SetCustomWallpaper(
22 custom_wallpaper_, WALLPAPER_LAYOUT_STRETCH);
23 }
12 update_wallpaper_count_ ++; 24 update_wallpaper_count_ ++;
13 } 25 }
14 26
15 int TestUserWallpaperDelegate::GetUpdateWallpaperCountAndReset() { 27 int TestUserWallpaperDelegate::GetUpdateWallpaperCountAndReset() {
16 int count = update_wallpaper_count_; 28 int count = update_wallpaper_count_;
17 update_wallpaper_count_ = 0; 29 update_wallpaper_count_ = 0;
18 return count; 30 return count;
19 } 31 }
20 32
21 } // namespace test 33 } // namespace test
22 } // namespace ash 34 } // namespace ash
OLDNEW
« no previous file with comments | « ash/test/test_user_wallpaper_delegate.h ('k') | chrome/browser/chromeos/login/wallpaper_manager_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698