| OLD | NEW | 
|---|
| 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_wallpaper_delegate.h" | 
| 6 | 6 | 
| 7 #include "ash/desktop_background/desktop_background_controller.h" | 7 #include "ash/desktop_background/desktop_background_controller.h" | 
| 8 #include "ash/shell.h" | 8 #include "ash/shell.h" | 
| 9 | 9 | 
| 10 namespace ash { | 10 namespace ash { | 
| 11 namespace test { | 11 namespace test { | 
| 12 | 12 | 
| 13 TestUserWallpaperDelegate::TestUserWallpaperDelegate() | 13 TestWallpaperDelegate::TestWallpaperDelegate() : update_wallpaper_count_(0) {} | 
| 14     : update_wallpaper_count_(0) {} |  | 
| 15 | 14 | 
| 16 TestUserWallpaperDelegate::~TestUserWallpaperDelegate() {} | 15 TestWallpaperDelegate::~TestWallpaperDelegate() {} | 
| 17 | 16 | 
| 18 void TestUserWallpaperDelegate::UpdateWallpaper(bool clear_cache) { | 17 void TestWallpaperDelegate::UpdateWallpaper(bool clear_cache) { | 
| 19   DefaultUserWallpaperDelegate::UpdateWallpaper(clear_cache); | 18   DefaultWallpaperDelegate::UpdateWallpaper(clear_cache); | 
| 20   if (!custom_wallpaper_.isNull()) { | 19   if (!custom_wallpaper_.isNull()) { | 
| 21     Shell::GetInstance()->desktop_background_controller()->SetWallpaperImage( | 20     Shell::GetInstance()->desktop_background_controller()->SetWallpaperImage( | 
| 22         custom_wallpaper_, wallpaper::WALLPAPER_LAYOUT_STRETCH); | 21         custom_wallpaper_, wallpaper::WALLPAPER_LAYOUT_STRETCH); | 
| 23   } | 22   } | 
| 24   update_wallpaper_count_++; | 23   update_wallpaper_count_++; | 
| 25 } | 24 } | 
| 26 | 25 | 
| 27 int TestUserWallpaperDelegate::GetUpdateWallpaperCountAndReset() { | 26 int TestWallpaperDelegate::GetUpdateWallpaperCountAndReset() { | 
| 28   int count = update_wallpaper_count_; | 27   int count = update_wallpaper_count_; | 
| 29   update_wallpaper_count_ = 0; | 28   update_wallpaper_count_ = 0; | 
| 30   return count; | 29   return count; | 
| 31 } | 30 } | 
| 32 | 31 | 
| 33 }  // namespace test | 32 }  // namespace test | 
| 34 }  // namespace ash | 33 }  // namespace ash | 
| OLD | NEW | 
|---|