resource.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. // Copyright 2018 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 UI_LOTTIE_RESOURCE_H_
  5. #define UI_LOTTIE_RESOURCE_H_
  6. #include <string>
  7. #include "base/component_export.h"
  8. #include "build/chromeos_buildflags.h"
  9. namespace gfx {
  10. class ImageSkia;
  11. }
  12. namespace ui {
  13. class ImageModel;
  14. }
  15. namespace lottie {
  16. // Used for loading a Lottie asset intended as a still image (not animated).
  17. COMPONENT_EXPORT(UI_LOTTIE)
  18. gfx::ImageSkia ParseLottieAsStillImage(const std::string& bytes_string);
  19. #if BUILDFLAG(IS_CHROMEOS_ASH)
  20. // Used for loading a Lottie asset intended as a still image (not animated),
  21. // with support for using different colors in light mode, dark mode, and
  22. // "elevated" dark mode (see |views::Widget::InitParams::background_elevation|).
  23. COMPONENT_EXPORT(UI_LOTTIE)
  24. ui::ImageModel ParseLottieAsThemedStillImage(const std::string& bytes_string);
  25. #endif
  26. } // namespace lottie
  27. #endif // UI_LOTTIE_RESOURCE_H_