context_provider_impl.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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 FUCHSIA_WEB_WEBENGINE_CONTEXT_PROVIDER_IMPL_H_
  5. #define FUCHSIA_WEB_WEBENGINE_CONTEXT_PROVIDER_IMPL_H_
  6. #include <fuchsia/web/cpp/fidl.h>
  7. #include "base/values.h"
  8. #include "fuchsia_web/webengine/web_engine_export.h"
  9. #include "fuchsia_web/webinstance_host/web_instance_host.h"
  10. class WEB_ENGINE_EXPORT ContextProviderImpl
  11. : public fuchsia::web::ContextProvider {
  12. public:
  13. ContextProviderImpl();
  14. ~ContextProviderImpl() override;
  15. ContextProviderImpl(const ContextProviderImpl&) = delete;
  16. ContextProviderImpl& operator=(const ContextProviderImpl&) = delete;
  17. // fuchsia::web::ContextProvider implementation.
  18. void Create(
  19. fuchsia::web::CreateContextParams params,
  20. fidl::InterfaceRequest<fuchsia::web::Context> context_request) override;
  21. // Sets a config to use for the test, instead of looking for the config file.
  22. void set_config_for_test(base::Value config);
  23. // Exposes the fuchsia.web.Debug API to offer to clients.
  24. fuchsia::web::Debug* debug_api();
  25. private:
  26. // Manages an isolated Environment, and the web instances hosted within it.
  27. WebInstanceHost web_instance_host_;
  28. };
  29. #endif // FUCHSIA_WEB_WEBENGINE_CONTEXT_PROVIDER_IMPL_H_