168043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)// Copyright 2013 The Chromium Authors. All rights reserved.
268043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be
368043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)// found in the LICENSE file.
468043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)
568043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)#ifndef ASH_TEST_TEST_USER_WALLPAPER_DELEGATE_H_
668043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)#define ASH_TEST_TEST_USER_WALLPAPER_DELEGATE_H_
768043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)
868043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)#include "ash/default_user_wallpaper_delegate.h"
968043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)
10f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)#include "ui/gfx/image/image_skia.h"
11f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)
1268043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)namespace ash {
1368043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)namespace test {
1468043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)
1568043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)class TestUserWallpaperDelegate : public DefaultUserWallpaperDelegate {
1668043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles) public:
17f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)  TestUserWallpaperDelegate();
18f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)  virtual ~TestUserWallpaperDelegate();
19f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)
20f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)  void set_custom_wallpaper(const gfx::ImageSkia& wallpaper) {
21f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)    custom_wallpaper_ = wallpaper;
22f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)  }
2368043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)
2468043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)  // DefaultUserWallpaperDelegate overrides:
2568043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)  virtual void UpdateWallpaper() OVERRIDE;
2668043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)
27f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)  // Returns and clears |update_wallpaper_count_|.
2868043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)  int GetUpdateWallpaperCountAndReset();
2968043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)
3068043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles) private:
31f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)  // Number of times that UpdateWallpaper() has been called.
3268043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)  int update_wallpaper_count_;
3368043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)
34f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)  // If non-null, used as custom wallpaper by UpdateWallpaper().
35f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)  gfx::ImageSkia custom_wallpaper_;
36f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)
3768043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)  DISALLOW_COPY_AND_ASSIGN(TestUserWallpaperDelegate);
3868043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)};
3968043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)
4068043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)}  // namespace test
4168043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)}  // namespace ash
4268043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)
4368043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)#endif  // ASH_TEST_TEST_USER_WALLPAPER_DELEGATE_H_
44