#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-private-field"
#endif
#include "third_party/blink/public/mojom/worker/dedicated_worker_host_factory.mojom-blink.h"
#include <math.h>
#include <stdint.h>
#include <utility>
#include "base/debug/alias.h"
#include "base/hash/md5_constexpr.h"
#include "base/run_loop.h"
#include "base/strings/string_number_conversions.h"
#include "base/task/thread_pool/thread_pool_instance.h"
#include "base/trace_event/trace_event.h"
#include "base/trace_event/typed_macros.h"
#include "mojo/public/cpp/bindings/features.h"
#include "mojo/public/cpp/bindings/lib/default_construct_tag_internal.h"
#include "mojo/public/cpp/bindings/lib/generated_code_util.h"
#include "mojo/public/cpp/bindings/lib/message_internal.h"
#include "mojo/public/cpp/bindings/lib/proxy_to_responder.h"
#include "mojo/public/cpp/bindings/lib/send_message_helper.h"
#include "mojo/public/cpp/bindings/lib/serialization_util.h"
#include "mojo/public/cpp/bindings/lib/unserialized_message_context.h"
#include "mojo/public/cpp/bindings/lib/validate_params.h"
#include "mojo/public/cpp/bindings/lib/validation_errors.h"
#include "mojo/public/cpp/bindings/mojo_buildflags.h"
#include "mojo/public/cpp/bindings/urgent_message_scope.h"
#include "mojo/public/interfaces/bindings/interface_control_messages.mojom.h"
#include "third_party/perfetto/include/perfetto/tracing/traced_value.h"
#include "third_party/blink/public/mojom/worker/dedicated_worker_host_factory.mojom-params-data.h"
#include "third_party/blink/public/mojom/worker/dedicated_worker_host_factory.mojom-shared-message-ids.h"
#include "third_party/blink/public/mojom/worker/dedicated_worker_host_factory.mojom-blink-import-headers.h"
#include "third_party/blink/public/mojom/worker/dedicated_worker_host_factory.mojom-blink-test-utils.h"
#include "mojo/public/cpp/bindings/lib/wtf_serialization.h"
#include "third_party/blink/public/common/service_worker/service_worker_embedded_worker_status_mojom_traits.h"
#include "third_party/blink/public/common/service_worker/service_worker_router_rule_mojom_traits.h"
namespace blink::mojom::blink {
const char kNavigation_DedicatedWorkerSpec[] = …;
const char DedicatedWorkerHostFactoryClient::Name_[] = …;
DedicatedWorkerHostFactoryClient::IPCStableHashFunction DedicatedWorkerHostFactoryClient::MessageToMethodInfo_(mojo::Message& message) { … }
const char* DedicatedWorkerHostFactoryClient::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t DedicatedWorkerHostFactoryClient::OnWorkerHostCreated_Sym::IPCStableHash() { … }
uint32_t DedicatedWorkerHostFactoryClient::OnScriptLoadStarted_Sym::IPCStableHash() { … }
uint32_t DedicatedWorkerHostFactoryClient::OnScriptLoadStartFailed_Sym::IPCStableHash() { … }
# endif
DedicatedWorkerHostFactoryClientProxy::DedicatedWorkerHostFactoryClientProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void DedicatedWorkerHostFactoryClientProxy::OnWorkerHostCreated(
::mojo::PendingRemote<::blink::mojom::blink::BrowserInterfaceBroker> in_browser_interface_broker, ::mojo::PendingRemote<::blink::mojom::blink::DedicatedWorkerHost> in_host, const ::scoped_refptr<const ::blink::SecurityOrigin>& in_origin) { … }
void DedicatedWorkerHostFactoryClientProxy::OnScriptLoadStarted(
::blink::mojom::blink::ServiceWorkerContainerInfoForClientPtr in_service_worker_container_info, ::blink::mojom::blink::WorkerMainScriptLoadParamsPtr in_main_script_load_params, ::std::unique_ptr<::blink::PendingURLLoaderFactoryBundle> in_subresource_loader_factories, ::mojo::PendingReceiver<::blink::mojom::blink::SubresourceLoaderUpdater> in_subresource_loader_updater, ::blink::mojom::blink::ControllerServiceWorkerInfoPtr in_controller_info, ::mojo::PendingRemote<::blink::mojom::blink::BackForwardCacheControllerHost> in_back_forward_cache_controller_host) { … }
void DedicatedWorkerHostFactoryClientProxy::OnScriptLoadStartFailed(
) { … }
bool DedicatedWorkerHostFactoryClientStubDispatch::Accept(
DedicatedWorkerHostFactoryClient* impl,
mojo::Message* message) { … }
bool DedicatedWorkerHostFactoryClientStubDispatch::AcceptWithResponder(
DedicatedWorkerHostFactoryClient* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kDedicatedWorkerHostFactoryClientValidationInfo[] = …;
bool DedicatedWorkerHostFactoryClientRequestValidator::Accept(mojo::Message* message) { … }
const char DedicatedWorkerHostFactory::Name_[] = …;
DedicatedWorkerHostFactory::IPCStableHashFunction DedicatedWorkerHostFactory::MessageToMethodInfo_(mojo::Message& message) { … }
const char* DedicatedWorkerHostFactory::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t DedicatedWorkerHostFactory::CreateWorkerHost_Sym::IPCStableHash() { … }
uint32_t DedicatedWorkerHostFactory::CreateWorkerHostAndStartScriptLoad_Sym::IPCStableHash() { … }
# endif
class DedicatedWorkerHostFactory_CreateWorkerHost_ForwardToCallback
: public mojo::MessageReceiver { … };
DedicatedWorkerHostFactoryProxy::DedicatedWorkerHostFactoryProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void DedicatedWorkerHostFactoryProxy::CreateWorkerHost(
const ::blink::DedicatedWorkerToken& in_token, const ::blink::KURL& in_script_url, const ::scoped_refptr<const ::blink::SecurityOrigin>& in_origin, ::mojo::PendingReceiver<::blink::mojom::blink::BrowserInterfaceBroker> in_browser_interface_broker, ::mojo::PendingReceiver<::blink::mojom::blink::DedicatedWorkerHost> in_host, CreateWorkerHostCallback callback) { … }
void DedicatedWorkerHostFactoryProxy::CreateWorkerHostAndStartScriptLoad(
const ::blink::DedicatedWorkerToken& in_token, const ::blink::KURL& in_script_url, ::network::mojom::blink::CredentialsMode in_credentials_mode, ::blink::mojom::blink::FetchClientSettingsObjectPtr in_outside_fetch_client_settings_object, ::mojo::PendingRemote<::blink::mojom::blink::BlobURLToken> in_blob_url_token, ::mojo::PendingRemote<DedicatedWorkerHostFactoryClient> in_client, ::net::StorageAccessApiStatus in_storage_access_api_status) { … }
class DedicatedWorkerHostFactory_CreateWorkerHost_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool DedicatedWorkerHostFactory_CreateWorkerHost_ForwardToCallback::Accept(
mojo::Message* message) { … }
void DedicatedWorkerHostFactory_CreateWorkerHost_ProxyToResponder::Run(
const ::network::CrossOriginEmbedderPolicy& in_parent_coep, ::mojo::PendingRemote<::blink::mojom::blink::BackForwardCacheControllerHost> in_back_forward_cache_controller_host) { … }
bool DedicatedWorkerHostFactoryStubDispatch::Accept(
DedicatedWorkerHostFactory* impl,
mojo::Message* message) { … }
bool DedicatedWorkerHostFactoryStubDispatch::AcceptWithResponder(
DedicatedWorkerHostFactory* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kDedicatedWorkerHostFactoryValidationInfo[] = …;
bool DedicatedWorkerHostFactoryRequestValidator::Accept(mojo::Message* message) { … }
bool DedicatedWorkerHostFactoryResponseValidator::Accept(mojo::Message* message) { … }
}
namespace mojo {
}
namespace blink::mojom::blink {
void DedicatedWorkerHostFactoryClientInterceptorForTesting::OnWorkerHostCreated(::mojo::PendingRemote<::blink::mojom::blink::BrowserInterfaceBroker> browser_interface_broker, ::mojo::PendingRemote<::blink::mojom::blink::DedicatedWorkerHost> host, const ::scoped_refptr<const ::blink::SecurityOrigin>& origin) { … }
void DedicatedWorkerHostFactoryClientInterceptorForTesting::OnScriptLoadStarted(::blink::mojom::blink::ServiceWorkerContainerInfoForClientPtr service_worker_container_info, ::blink::mojom::blink::WorkerMainScriptLoadParamsPtr main_script_load_params, ::std::unique_ptr<::blink::PendingURLLoaderFactoryBundle> subresource_loader_factories, ::mojo::PendingReceiver<::blink::mojom::blink::SubresourceLoaderUpdater> subresource_loader_updater, ::blink::mojom::blink::ControllerServiceWorkerInfoPtr controller_info, ::mojo::PendingRemote<::blink::mojom::blink::BackForwardCacheControllerHost> back_forward_cache_controller_host) { … }
void DedicatedWorkerHostFactoryClientInterceptorForTesting::OnScriptLoadStartFailed() { … }
DedicatedWorkerHostFactoryClientAsyncWaiter::DedicatedWorkerHostFactoryClientAsyncWaiter(
DedicatedWorkerHostFactoryClient* proxy) : … { … }
DedicatedWorkerHostFactoryClientAsyncWaiter::~DedicatedWorkerHostFactoryClientAsyncWaiter() = default;
void DedicatedWorkerHostFactoryInterceptorForTesting::CreateWorkerHost(const ::blink::DedicatedWorkerToken& token, const ::blink::KURL& script_url, const ::scoped_refptr<const ::blink::SecurityOrigin>& origin, ::mojo::PendingReceiver<::blink::mojom::blink::BrowserInterfaceBroker> browser_interface_broker, ::mojo::PendingReceiver<::blink::mojom::blink::DedicatedWorkerHost> host, CreateWorkerHostCallback callback) { … }
void DedicatedWorkerHostFactoryInterceptorForTesting::CreateWorkerHostAndStartScriptLoad(const ::blink::DedicatedWorkerToken& token, const ::blink::KURL& script_url, ::network::mojom::blink::CredentialsMode credentials_mode, ::blink::mojom::blink::FetchClientSettingsObjectPtr outside_fetch_client_settings_object, ::mojo::PendingRemote<::blink::mojom::blink::BlobURLToken> blob_url_token, ::mojo::PendingRemote<DedicatedWorkerHostFactoryClient> client, ::net::StorageAccessApiStatus storage_access_api_status) { … }
DedicatedWorkerHostFactoryAsyncWaiter::DedicatedWorkerHostFactoryAsyncWaiter(
DedicatedWorkerHostFactory* proxy) : … { … }
DedicatedWorkerHostFactoryAsyncWaiter::~DedicatedWorkerHostFactoryAsyncWaiter() = default;
void DedicatedWorkerHostFactoryAsyncWaiter::CreateWorkerHost(
const ::blink::DedicatedWorkerToken& token, const ::blink::KURL& script_url, const ::scoped_refptr<const ::blink::SecurityOrigin>& origin, ::mojo::PendingReceiver<::blink::mojom::blink::BrowserInterfaceBroker> browser_interface_broker, ::mojo::PendingReceiver<::blink::mojom::blink::DedicatedWorkerHost> host, ::network::CrossOriginEmbedderPolicy* out_parent_coep, ::mojo::PendingRemote<::blink::mojom::blink::BackForwardCacheControllerHost>* out_back_forward_cache_controller_host) { … }
}
#if defined(__clang__)
#pragma clang diagnostic pop
#endif