wallpaper_controller_test_api.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. // Copyright 2017 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef ASH_WALLPAPER_WALLPAPER_CONTROLLER_TEST_API_H_
  5. #define ASH_WALLPAPER_WALLPAPER_CONTROLLER_TEST_API_H_
  6. #include "ash/ash_export.h"
  7. #include "third_party/skia/include/core/SkColor.h"
  8. namespace ash {
  9. class WallpaperControllerImpl;
  10. class ASH_EXPORT WallpaperControllerTestApi {
  11. public:
  12. explicit WallpaperControllerTestApi(WallpaperControllerImpl* controller);
  13. WallpaperControllerTestApi(const WallpaperControllerTestApi&) = delete;
  14. WallpaperControllerTestApi& operator=(const WallpaperControllerTestApi&) =
  15. delete;
  16. virtual ~WallpaperControllerTestApi();
  17. // Creates and sets a new wallpaper that causes the prominent color of the
  18. // |controller_| to be a valid (i.e. not kInvalidWallpaperColor) color. The
  19. // WallpaperControllerObservers should be notified as well. This assumes the
  20. // default DARK-MUTED luma-saturation ranges are in effect.
  21. //
  22. // The expected prominent color is returned.
  23. SkColor ApplyColorProducingWallpaper();
  24. // Simulates starting the fullscreen wallpaper preview.
  25. void StartWallpaperPreview();
  26. // Simulates ending the fullscreen wallpaper preview.
  27. // |confirm_preview_wallpaper| indicates if the preview wallpaper should be
  28. // set as the actual user wallpaper.
  29. void EndWallpaperPreview(bool confirm_preview_wallpaper);
  30. private:
  31. WallpaperControllerImpl* controller_;
  32. };
  33. } // namespace ash
  34. #endif // ASH_WALLPAPER_WALLPAPER_CONTROLLER_TEST_API_H_