#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-private-field"
#endif
#include "third_party/blink/public/mojom/service_worker/service_worker_container.mojom.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/service_worker/service_worker_container.mojom-params-data.h"
#include "third_party/blink/public/mojom/service_worker/service_worker_container.mojom-shared-message-ids.h"
#include "third_party/blink/public/mojom/service_worker/service_worker_container.mojom-import-headers.h"
#include "third_party/blink/public/mojom/service_worker/service_worker_container.mojom-test-utils.h"
#include "third_party/blink/public/common/messaging/accelerated_static_bitmap_image_mojom_traits.h"
#include "third_party/blink/public/common/messaging/cloneable_message_mojom_traits.h"
#include "third_party/blink/public/common/messaging/task_attribution_id_mojom_traits.h"
#include "third_party/blink/public/common/messaging/transferable_message_mojom_traits.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 {
ServiceWorkerContainerInfoForClient::ServiceWorkerContainerInfoForClient()
: … { … }
ServiceWorkerContainerInfoForClient::ServiceWorkerContainerInfoForClient(
::mojo::PendingAssociatedRemote<ServiceWorkerContainerHost> host_remote_in,
::mojo::PendingAssociatedReceiver<ServiceWorkerContainer> client_receiver_in)
: … { … }
ServiceWorkerContainerInfoForClient::~ServiceWorkerContainerInfoForClient() = default;
void ServiceWorkerContainerInfoForClient::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool ServiceWorkerContainerInfoForClient::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
const char ServiceWorkerContainerHost::Name_[] = …;
ServiceWorkerContainerHost::IPCStableHashFunction ServiceWorkerContainerHost::MessageToMethodInfo_(mojo::Message& message) { … }
const char* ServiceWorkerContainerHost::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t ServiceWorkerContainerHost::Register_Sym::IPCStableHash() { … }
uint32_t ServiceWorkerContainerHost::GetRegistration_Sym::IPCStableHash() { … }
uint32_t ServiceWorkerContainerHost::GetRegistrations_Sym::IPCStableHash() { … }
uint32_t ServiceWorkerContainerHost::GetRegistrationForReady_Sym::IPCStableHash() { … }
uint32_t ServiceWorkerContainerHost::EnsureControllerServiceWorker_Sym::IPCStableHash() { … }
uint32_t ServiceWorkerContainerHost::CloneContainerHost_Sym::IPCStableHash() { … }
uint32_t ServiceWorkerContainerHost::HintToUpdateServiceWorker_Sym::IPCStableHash() { … }
uint32_t ServiceWorkerContainerHost::EnsureFileAccess_Sym::IPCStableHash() { … }
uint32_t ServiceWorkerContainerHost::OnExecutionReady_Sym::IPCStableHash() { … }
# endif
class ServiceWorkerContainerHost_Register_ForwardToCallback
: public mojo::MessageReceiver { … };
class ServiceWorkerContainerHost_GetRegistration_ForwardToCallback
: public mojo::MessageReceiver { … };
class ServiceWorkerContainerHost_GetRegistrations_ForwardToCallback
: public mojo::MessageReceiver { … };
class ServiceWorkerContainerHost_GetRegistrationForReady_ForwardToCallback
: public mojo::MessageReceiver { … };
class ServiceWorkerContainerHost_EnsureFileAccess_ForwardToCallback
: public mojo::MessageReceiver { … };
ServiceWorkerContainerHostProxy::ServiceWorkerContainerHostProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void ServiceWorkerContainerHostProxy::Register(
const ::GURL& in_script_url, ::blink::mojom::ServiceWorkerRegistrationOptionsPtr in_options, ::blink::mojom::FetchClientSettingsObjectPtr in_outside_fetch_client_settings_object, RegisterCallback callback) { … }
void ServiceWorkerContainerHostProxy::GetRegistration(
const ::GURL& in_client_url, GetRegistrationCallback callback) { … }
void ServiceWorkerContainerHostProxy::GetRegistrations(
GetRegistrationsCallback callback) { … }
void ServiceWorkerContainerHostProxy::GetRegistrationForReady(
GetRegistrationForReadyCallback callback) { … }
void ServiceWorkerContainerHostProxy::EnsureControllerServiceWorker(
::mojo::PendingReceiver<::blink::mojom::ControllerServiceWorker> in_receiver, ControllerServiceWorkerPurpose in_purpose) { … }
void ServiceWorkerContainerHostProxy::CloneContainerHost(
::mojo::PendingReceiver<ServiceWorkerContainerHost> in_container_host) { … }
void ServiceWorkerContainerHostProxy::HintToUpdateServiceWorker(
) { … }
void ServiceWorkerContainerHostProxy::EnsureFileAccess(
const std::vector<::base::FilePath>& in_files, EnsureFileAccessCallback callback) { … }
void ServiceWorkerContainerHostProxy::OnExecutionReady(
) { … }
class ServiceWorkerContainerHost_Register_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool ServiceWorkerContainerHost_Register_ForwardToCallback::Accept(
mojo::Message* message) { … }
void ServiceWorkerContainerHost_Register_ProxyToResponder::Run(
::blink::mojom::ServiceWorkerErrorType in_error, const std::optional<std::string>& in_error_msg, ::blink::mojom::ServiceWorkerRegistrationObjectInfoPtr in_registration) { … }
class ServiceWorkerContainerHost_GetRegistration_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool ServiceWorkerContainerHost_GetRegistration_ForwardToCallback::Accept(
mojo::Message* message) { … }
void ServiceWorkerContainerHost_GetRegistration_ProxyToResponder::Run(
::blink::mojom::ServiceWorkerErrorType in_error, const std::optional<std::string>& in_error_msg, ::blink::mojom::ServiceWorkerRegistrationObjectInfoPtr in_registration) { … }
class ServiceWorkerContainerHost_GetRegistrations_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool ServiceWorkerContainerHost_GetRegistrations_ForwardToCallback::Accept(
mojo::Message* message) { … }
void ServiceWorkerContainerHost_GetRegistrations_ProxyToResponder::Run(
::blink::mojom::ServiceWorkerErrorType in_error, const std::optional<std::string>& in_error_msg, std::optional<std::vector<::blink::mojom::ServiceWorkerRegistrationObjectInfoPtr>> in_infos) { … }
class ServiceWorkerContainerHost_GetRegistrationForReady_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool ServiceWorkerContainerHost_GetRegistrationForReady_ForwardToCallback::Accept(
mojo::Message* message) { … }
void ServiceWorkerContainerHost_GetRegistrationForReady_ProxyToResponder::Run(
::blink::mojom::ServiceWorkerRegistrationObjectInfoPtr in_registration) { … }
class ServiceWorkerContainerHost_EnsureFileAccess_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool ServiceWorkerContainerHost_EnsureFileAccess_ForwardToCallback::Accept(
mojo::Message* message) { … }
void ServiceWorkerContainerHost_EnsureFileAccess_ProxyToResponder::Run(
) { … }
bool ServiceWorkerContainerHostStubDispatch::Accept(
ServiceWorkerContainerHost* impl,
mojo::Message* message) { … }
bool ServiceWorkerContainerHostStubDispatch::AcceptWithResponder(
ServiceWorkerContainerHost* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kServiceWorkerContainerHostValidationInfo[] = …;
bool ServiceWorkerContainerHostRequestValidator::Accept(mojo::Message* message) { … }
bool ServiceWorkerContainerHostResponseValidator::Accept(mojo::Message* message) { … }
const char ServiceWorkerContainer::Name_[] = …;
ServiceWorkerContainer::IPCStableHashFunction ServiceWorkerContainer::MessageToMethodInfo_(mojo::Message& message) { … }
const char* ServiceWorkerContainer::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t ServiceWorkerContainer::SetController_Sym::IPCStableHash() { … }
uint32_t ServiceWorkerContainer::PostMessageToClient_Sym::IPCStableHash() { … }
uint32_t ServiceWorkerContainer::CountFeature_Sym::IPCStableHash() { … }
# endif
ServiceWorkerContainerProxy::ServiceWorkerContainerProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void ServiceWorkerContainerProxy::SetController(
::blink::mojom::ControllerServiceWorkerInfoPtr in_controller_info, bool in_should_notify_controllerchange) { … }
void ServiceWorkerContainerProxy::PostMessageToClient(
::blink::mojom::ServiceWorkerObjectInfoPtr in_source, ::blink::TransferableMessage in_message) { … }
void ServiceWorkerContainerProxy::CountFeature(
::blink::mojom::WebFeature in_feature) { … }
bool ServiceWorkerContainerStubDispatch::Accept(
ServiceWorkerContainer* impl,
mojo::Message* message) { … }
bool ServiceWorkerContainerStubDispatch::AcceptWithResponder(
ServiceWorkerContainer* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kServiceWorkerContainerValidationInfo[] = …;
bool ServiceWorkerContainerRequestValidator::Accept(mojo::Message* message) { … }
}
namespace mojo {
bool StructTraits<::blink::mojom::ServiceWorkerContainerInfoForClient::DataView, ::blink::mojom::ServiceWorkerContainerInfoForClientPtr>::Read(
::blink::mojom::ServiceWorkerContainerInfoForClient::DataView input,
::blink::mojom::ServiceWorkerContainerInfoForClientPtr* output) { … }
}
namespace blink::mojom {
void ServiceWorkerContainerHostInterceptorForTesting::Register(const ::GURL& script_url, ::blink::mojom::ServiceWorkerRegistrationOptionsPtr options, ::blink::mojom::FetchClientSettingsObjectPtr outside_fetch_client_settings_object, RegisterCallback callback) { … }
void ServiceWorkerContainerHostInterceptorForTesting::GetRegistration(const ::GURL& client_url, GetRegistrationCallback callback) { … }
void ServiceWorkerContainerHostInterceptorForTesting::GetRegistrations(GetRegistrationsCallback callback) { … }
void ServiceWorkerContainerHostInterceptorForTesting::GetRegistrationForReady(GetRegistrationForReadyCallback callback) { … }
void ServiceWorkerContainerHostInterceptorForTesting::EnsureControllerServiceWorker(::mojo::PendingReceiver<::blink::mojom::ControllerServiceWorker> receiver, ControllerServiceWorkerPurpose purpose) { … }
void ServiceWorkerContainerHostInterceptorForTesting::CloneContainerHost(::mojo::PendingReceiver<ServiceWorkerContainerHost> container_host) { … }
void ServiceWorkerContainerHostInterceptorForTesting::HintToUpdateServiceWorker() { … }
void ServiceWorkerContainerHostInterceptorForTesting::EnsureFileAccess(const std::vector<::base::FilePath>& files, EnsureFileAccessCallback callback) { … }
void ServiceWorkerContainerHostInterceptorForTesting::OnExecutionReady() { … }
ServiceWorkerContainerHostAsyncWaiter::ServiceWorkerContainerHostAsyncWaiter(
ServiceWorkerContainerHost* proxy) : … { … }
ServiceWorkerContainerHostAsyncWaiter::~ServiceWorkerContainerHostAsyncWaiter() = default;
void ServiceWorkerContainerHostAsyncWaiter::Register(
const ::GURL& script_url, ::blink::mojom::ServiceWorkerRegistrationOptionsPtr options, ::blink::mojom::FetchClientSettingsObjectPtr outside_fetch_client_settings_object, ::blink::mojom::ServiceWorkerErrorType* out_error, std::optional<std::string>* out_error_msg, ::blink::mojom::ServiceWorkerRegistrationObjectInfoPtr* out_registration) { … }
void ServiceWorkerContainerHostAsyncWaiter::GetRegistration(
const ::GURL& client_url, ::blink::mojom::ServiceWorkerErrorType* out_error, std::optional<std::string>* out_error_msg, ::blink::mojom::ServiceWorkerRegistrationObjectInfoPtr* out_registration) { … }
void ServiceWorkerContainerHostAsyncWaiter::GetRegistrations(
::blink::mojom::ServiceWorkerErrorType* out_error, std::optional<std::string>* out_error_msg, std::optional<std::vector<::blink::mojom::ServiceWorkerRegistrationObjectInfoPtr>>* out_infos) { … }
void ServiceWorkerContainerHostAsyncWaiter::GetRegistrationForReady(
::blink::mojom::ServiceWorkerRegistrationObjectInfoPtr* out_registration) { … }
::blink::mojom::ServiceWorkerRegistrationObjectInfoPtr ServiceWorkerContainerHostAsyncWaiter::GetRegistrationForReady(
) { … }
void ServiceWorkerContainerHostAsyncWaiter::EnsureFileAccess(
const std::vector<::base::FilePath>& files) { … }
void ServiceWorkerContainerInterceptorForTesting::SetController(::blink::mojom::ControllerServiceWorkerInfoPtr controller_info, bool should_notify_controllerchange) { … }
void ServiceWorkerContainerInterceptorForTesting::PostMessageToClient(::blink::mojom::ServiceWorkerObjectInfoPtr source, ::blink::TransferableMessage message) { … }
void ServiceWorkerContainerInterceptorForTesting::CountFeature(::blink::mojom::WebFeature feature) { … }
ServiceWorkerContainerAsyncWaiter::ServiceWorkerContainerAsyncWaiter(
ServiceWorkerContainer* proxy) : … { … }
ServiceWorkerContainerAsyncWaiter::~ServiceWorkerContainerAsyncWaiter() = default;
}
#if defined(__clang__)
#pragma clang diagnostic pop
#endif