#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-private-field"
#endif
#include "third_party/blink/public/mojom/background_sync/background_sync.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/background_sync/background_sync.mojom-params-data.h"
#include "third_party/blink/public/mojom/background_sync/background_sync.mojom-shared-message-ids.h"
#include "third_party/blink/public/mojom/background_sync/background_sync.mojom-blink-import-headers.h"
#include "third_party/blink/public/mojom/background_sync/background_sync.mojom-blink-test-utils.h"
#include "mojo/public/cpp/bindings/lib/wtf_serialization.h"
namespace blink::mojom::blink {
SyncRegistrationOptions::SyncRegistrationOptions()
: … { … }
SyncRegistrationOptions::SyncRegistrationOptions(
const WTF::String& tag_in,
int64_t min_interval_in)
: … { … }
SyncRegistrationOptions::~SyncRegistrationOptions() = default;
size_t SyncRegistrationOptions::Hash(size_t seed) const { … }
void SyncRegistrationOptions::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool SyncRegistrationOptions::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
BackgroundSyncRegistrationInfo::BackgroundSyncRegistrationInfo()
: … { … }
BackgroundSyncRegistrationInfo::BackgroundSyncRegistrationInfo(
int64_t service_worker_registration_id_in,
const WTF::String& tag_in,
BackgroundSyncType sync_type_in)
: … { … }
BackgroundSyncRegistrationInfo::~BackgroundSyncRegistrationInfo() = default;
size_t BackgroundSyncRegistrationInfo::Hash(size_t seed) const { … }
void BackgroundSyncRegistrationInfo::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool BackgroundSyncRegistrationInfo::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
const char OneShotBackgroundSyncService::Name_[] = …;
OneShotBackgroundSyncService::IPCStableHashFunction OneShotBackgroundSyncService::MessageToMethodInfo_(mojo::Message& message) { … }
const char* OneShotBackgroundSyncService::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t OneShotBackgroundSyncService::Register_Sym::IPCStableHash() { … }
uint32_t OneShotBackgroundSyncService::DidResolveRegistration_Sym::IPCStableHash() { … }
uint32_t OneShotBackgroundSyncService::GetRegistrations_Sym::IPCStableHash() { … }
# endif
class OneShotBackgroundSyncService_Register_ForwardToCallback
: public mojo::MessageReceiver { … };
class OneShotBackgroundSyncService_GetRegistrations_ForwardToCallback
: public mojo::MessageReceiver { … };
OneShotBackgroundSyncServiceProxy::OneShotBackgroundSyncServiceProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void OneShotBackgroundSyncServiceProxy::Register(
SyncRegistrationOptionsPtr in_options, int64_t in_service_worker_registration_id, RegisterCallback callback) { … }
void OneShotBackgroundSyncServiceProxy::DidResolveRegistration(
BackgroundSyncRegistrationInfoPtr in_registration_info) { … }
void OneShotBackgroundSyncServiceProxy::GetRegistrations(
int64_t in_service_worker_registration_id, GetRegistrationsCallback callback) { … }
class OneShotBackgroundSyncService_Register_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool OneShotBackgroundSyncService_Register_ForwardToCallback::Accept(
mojo::Message* message) { … }
void OneShotBackgroundSyncService_Register_ProxyToResponder::Run(
BackgroundSyncError in_err, SyncRegistrationOptionsPtr in_options) { … }
class OneShotBackgroundSyncService_GetRegistrations_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool OneShotBackgroundSyncService_GetRegistrations_ForwardToCallback::Accept(
mojo::Message* message) { … }
void OneShotBackgroundSyncService_GetRegistrations_ProxyToResponder::Run(
BackgroundSyncError in_err, WTF::Vector<SyncRegistrationOptionsPtr> in_registrations) { … }
bool OneShotBackgroundSyncServiceStubDispatch::Accept(
OneShotBackgroundSyncService* impl,
mojo::Message* message) { … }
bool OneShotBackgroundSyncServiceStubDispatch::AcceptWithResponder(
OneShotBackgroundSyncService* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kOneShotBackgroundSyncServiceValidationInfo[] = …;
bool OneShotBackgroundSyncServiceRequestValidator::Accept(mojo::Message* message) { … }
bool OneShotBackgroundSyncServiceResponseValidator::Accept(mojo::Message* message) { … }
const char PeriodicBackgroundSyncService::Name_[] = …;
PeriodicBackgroundSyncService::IPCStableHashFunction PeriodicBackgroundSyncService::MessageToMethodInfo_(mojo::Message& message) { … }
const char* PeriodicBackgroundSyncService::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t PeriodicBackgroundSyncService::Register_Sym::IPCStableHash() { … }
uint32_t PeriodicBackgroundSyncService::Unregister_Sym::IPCStableHash() { … }
uint32_t PeriodicBackgroundSyncService::GetRegistrations_Sym::IPCStableHash() { … }
# endif
class PeriodicBackgroundSyncService_Register_ForwardToCallback
: public mojo::MessageReceiver { … };
class PeriodicBackgroundSyncService_Unregister_ForwardToCallback
: public mojo::MessageReceiver { … };
class PeriodicBackgroundSyncService_GetRegistrations_ForwardToCallback
: public mojo::MessageReceiver { … };
PeriodicBackgroundSyncServiceProxy::PeriodicBackgroundSyncServiceProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void PeriodicBackgroundSyncServiceProxy::Register(
SyncRegistrationOptionsPtr in_options, int64_t in_service_worker_registration_id, RegisterCallback callback) { … }
void PeriodicBackgroundSyncServiceProxy::Unregister(
int64_t in_service_worker_registration_id, const WTF::String& in_tag, UnregisterCallback callback) { … }
void PeriodicBackgroundSyncServiceProxy::GetRegistrations(
int64_t in_service_worker_registration_id, GetRegistrationsCallback callback) { … }
class PeriodicBackgroundSyncService_Register_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool PeriodicBackgroundSyncService_Register_ForwardToCallback::Accept(
mojo::Message* message) { … }
void PeriodicBackgroundSyncService_Register_ProxyToResponder::Run(
BackgroundSyncError in_err, SyncRegistrationOptionsPtr in_options) { … }
class PeriodicBackgroundSyncService_Unregister_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool PeriodicBackgroundSyncService_Unregister_ForwardToCallback::Accept(
mojo::Message* message) { … }
void PeriodicBackgroundSyncService_Unregister_ProxyToResponder::Run(
BackgroundSyncError in_err) { … }
class PeriodicBackgroundSyncService_GetRegistrations_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool PeriodicBackgroundSyncService_GetRegistrations_ForwardToCallback::Accept(
mojo::Message* message) { … }
void PeriodicBackgroundSyncService_GetRegistrations_ProxyToResponder::Run(
BackgroundSyncError in_err, WTF::Vector<SyncRegistrationOptionsPtr> in_registrations) { … }
bool PeriodicBackgroundSyncServiceStubDispatch::Accept(
PeriodicBackgroundSyncService* impl,
mojo::Message* message) { … }
bool PeriodicBackgroundSyncServiceStubDispatch::AcceptWithResponder(
PeriodicBackgroundSyncService* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kPeriodicBackgroundSyncServiceValidationInfo[] = …;
bool PeriodicBackgroundSyncServiceRequestValidator::Accept(mojo::Message* message) { … }
bool PeriodicBackgroundSyncServiceResponseValidator::Accept(mojo::Message* message) { … }
}
namespace mojo {
bool StructTraits<::blink::mojom::blink::SyncRegistrationOptions::DataView, ::blink::mojom::blink::SyncRegistrationOptionsPtr>::Read(
::blink::mojom::blink::SyncRegistrationOptions::DataView input,
::blink::mojom::blink::SyncRegistrationOptionsPtr* output) { … }
bool StructTraits<::blink::mojom::blink::BackgroundSyncRegistrationInfo::DataView, ::blink::mojom::blink::BackgroundSyncRegistrationInfoPtr>::Read(
::blink::mojom::blink::BackgroundSyncRegistrationInfo::DataView input,
::blink::mojom::blink::BackgroundSyncRegistrationInfoPtr* output) { … }
}
namespace blink::mojom::blink {
void OneShotBackgroundSyncServiceInterceptorForTesting::Register(SyncRegistrationOptionsPtr options, int64_t service_worker_registration_id, RegisterCallback callback) { … }
void OneShotBackgroundSyncServiceInterceptorForTesting::DidResolveRegistration(BackgroundSyncRegistrationInfoPtr registration_info) { … }
void OneShotBackgroundSyncServiceInterceptorForTesting::GetRegistrations(int64_t service_worker_registration_id, GetRegistrationsCallback callback) { … }
OneShotBackgroundSyncServiceAsyncWaiter::OneShotBackgroundSyncServiceAsyncWaiter(
OneShotBackgroundSyncService* proxy) : … { … }
OneShotBackgroundSyncServiceAsyncWaiter::~OneShotBackgroundSyncServiceAsyncWaiter() = default;
void OneShotBackgroundSyncServiceAsyncWaiter::Register(
SyncRegistrationOptionsPtr options, int64_t service_worker_registration_id, BackgroundSyncError* out_err, SyncRegistrationOptionsPtr* out_options) { … }
void OneShotBackgroundSyncServiceAsyncWaiter::GetRegistrations(
int64_t service_worker_registration_id, BackgroundSyncError* out_err, WTF::Vector<SyncRegistrationOptionsPtr>* out_registrations) { … }
void PeriodicBackgroundSyncServiceInterceptorForTesting::Register(SyncRegistrationOptionsPtr options, int64_t service_worker_registration_id, RegisterCallback callback) { … }
void PeriodicBackgroundSyncServiceInterceptorForTesting::Unregister(int64_t service_worker_registration_id, const WTF::String& tag, UnregisterCallback callback) { … }
void PeriodicBackgroundSyncServiceInterceptorForTesting::GetRegistrations(int64_t service_worker_registration_id, GetRegistrationsCallback callback) { … }
PeriodicBackgroundSyncServiceAsyncWaiter::PeriodicBackgroundSyncServiceAsyncWaiter(
PeriodicBackgroundSyncService* proxy) : … { … }
PeriodicBackgroundSyncServiceAsyncWaiter::~PeriodicBackgroundSyncServiceAsyncWaiter() = default;
void PeriodicBackgroundSyncServiceAsyncWaiter::Register(
SyncRegistrationOptionsPtr options, int64_t service_worker_registration_id, BackgroundSyncError* out_err, SyncRegistrationOptionsPtr* out_options) { … }
void PeriodicBackgroundSyncServiceAsyncWaiter::Unregister(
int64_t service_worker_registration_id, const WTF::String& tag, BackgroundSyncError* out_err) { … }
BackgroundSyncError PeriodicBackgroundSyncServiceAsyncWaiter::Unregister(
int64_t service_worker_registration_id, const WTF::String& tag) { … }
void PeriodicBackgroundSyncServiceAsyncWaiter::GetRegistrations(
int64_t service_worker_registration_id, BackgroundSyncError* out_err, WTF::Vector<SyncRegistrationOptionsPtr>* out_registrations) { … }
}
#if defined(__clang__)
#pragma clang diagnostic pop
#endif