web_types.h 939 B

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. #ifndef CHROMECAST_BROWSER_WEB_TYPES_H_
  5. #define CHROMECAST_BROWSER_WEB_TYPES_H_
  6. #include <ostream>
  7. namespace chromecast {
  8. enum class BackgroundColor {
  9. NONE,
  10. WHITE,
  11. BLACK,
  12. TRANSPARENT,
  13. };
  14. // Page state for the main frame.
  15. enum class PageState {
  16. IDLE = 0, // Main frame has not started yet.
  17. LOADING = 1, // Main frame is loading resources.
  18. LOADED = 2, // Main frame is loaded, but sub-frames may still be loading.
  19. CLOSED = 3, // Page is closed and should be cleaned up.
  20. DESTROYED = 4, // The WebContents is destroyed and can no longer be used.
  21. ERROR = 5, // Main frame is in an error state.
  22. };
  23. std::ostream& operator<<(std::ostream& os, PageState state);
  24. } // namespace chromecast
  25. #endif // CHROMECAST_BROWSER_WEB_TYPES_H_