ambient_animation_static_resources_stub.cc 1.3 KB

123456789101112131415161718192021222324252627282930313233
  1. // Copyright 2021 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. #include "ash/ambient/resources/ambient_animation_static_resources.h"
  5. #include "base/logging.h"
  6. namespace ash {
  7. // This stub source file is only built on platforms that don't support the
  8. // ambient animation resources. 2 things are required currently for support:
  9. // 1) An internal chrome-branded checkout.
  10. // 2) The include_ash_ambient_animation_resources GN flag must be true.
  11. // Without these, the ambient animation code will still compile due to the
  12. // dummy definitions in this stub, but any resource loading will immediately
  13. // fail with a FATAL error.
  14. // static
  15. std::unique_ptr<AmbientAnimationStaticResources>
  16. AmbientAnimationStaticResources::Create(AmbientAnimationTheme theme,
  17. bool serializable) {
  18. if (theme == AmbientAnimationTheme::kSlideshow)
  19. return nullptr;
  20. LOG(FATAL) << "Ambient animation resources are not available on this build. "
  21. "To enable, an internal chrome-branded checkout is required, "
  22. "and the include_ash_ambient_animation_resources GN flag must "
  23. "be true.";
  24. return nullptr;
  25. }
  26. } // namespace ash