#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-private-field"
#endif
#include "third_party/blink/public/mojom/payments/payment_app.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/payments/payment_app.mojom-params-data.h"
#include "third_party/blink/public/mojom/payments/payment_app.mojom-shared-message-ids.h"
#include "third_party/blink/public/mojom/payments/payment_app.mojom-blink-import-headers.h"
#include "third_party/blink/public/mojom/payments/payment_app.mojom-blink-test-utils.h"
#include "mojo/public/cpp/bindings/lib/wtf_serialization.h"
namespace payments::mojom::blink {
PaymentInstrument::PaymentInstrument()
: … { … }
PaymentInstrument::PaymentInstrument(
const WTF::String& name_in,
WTF::Vector<::blink::mojom::blink::ManifestImageResourcePtr> icons_in,
const WTF::String& method_in,
const WTF::String& stringified_capabilities_in,
WTF::Vector<::payments::mojom::blink::BasicCardNetwork> supported_networks_in)
: … { … }
PaymentInstrument::~PaymentInstrument() = default;
void PaymentInstrument::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool PaymentInstrument::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
CanMakePaymentEventData::CanMakePaymentEventData()
: … { … }
CanMakePaymentEventData::CanMakePaymentEventData(
const ::blink::KURL& top_origin_in,
const ::blink::KURL& payment_request_origin_in,
WTF::Vector<::payments::mojom::blink::PaymentMethodDataPtr> method_data_in,
WTF::Vector<::payments::mojom::blink::PaymentDetailsModifierPtr> modifiers_in)
: … { … }
CanMakePaymentEventData::~CanMakePaymentEventData() = default;
void CanMakePaymentEventData::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool CanMakePaymentEventData::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
PaymentRequestEventData::PaymentRequestEventData()
: … { … }
PaymentRequestEventData::PaymentRequestEventData(
const ::blink::KURL& top_origin_in,
const ::blink::KURL& payment_request_origin_in,
const WTF::String& payment_request_id_in,
WTF::Vector<::payments::mojom::blink::PaymentMethodDataPtr> method_data_in,
::payments::mojom::blink::PaymentCurrencyAmountPtr total_in,
WTF::Vector<::payments::mojom::blink::PaymentDetailsModifierPtr> modifiers_in,
const WTF::String& instrument_key_in,
::payments::mojom::blink::PaymentOptionsPtr payment_options_in,
std::optional<WTF::Vector<::payments::mojom::blink::PaymentShippingOptionPtr>> shipping_options_in,
::mojo::PendingRemote<::payments::mojom::blink::PaymentHandlerHost> payment_handler_host_in)
: … { … }
PaymentRequestEventData::~PaymentRequestEventData() = default;
void PaymentRequestEventData::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool PaymentRequestEventData::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
CanMakePaymentResponse::CanMakePaymentResponse()
: … { … }
CanMakePaymentResponse::CanMakePaymentResponse(
CanMakePaymentEventResponseType response_type_in,
bool can_make_payment_in)
: … { … }
CanMakePaymentResponse::~CanMakePaymentResponse() = default;
size_t CanMakePaymentResponse::Hash(size_t seed) const { … }
void CanMakePaymentResponse::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool CanMakePaymentResponse::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
PaymentHandlerResponse::PaymentHandlerResponse()
: … { … }
PaymentHandlerResponse::PaymentHandlerResponse(
const WTF::String& method_name_in,
const WTF::String& stringified_details_in,
PaymentEventResponseType response_type_in,
const WTF::String& payer_name_in,
const WTF::String& payer_email_in,
const WTF::String& payer_phone_in,
::payments::mojom::blink::PaymentAddressPtr shipping_address_in,
const WTF::String& shipping_option_in)
: … { … }
PaymentHandlerResponse::~PaymentHandlerResponse() = default;
void PaymentHandlerResponse::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool PaymentHandlerResponse::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
const char PaymentManager::Name_[] = …;
PaymentManager::IPCStableHashFunction PaymentManager::MessageToMethodInfo_(mojo::Message& message) { … }
const char* PaymentManager::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t PaymentManager::Init_Sym::IPCStableHash() { … }
uint32_t PaymentManager::DeletePaymentInstrument_Sym::IPCStableHash() { … }
uint32_t PaymentManager::GetPaymentInstrument_Sym::IPCStableHash() { … }
uint32_t PaymentManager::KeysOfPaymentInstruments_Sym::IPCStableHash() { … }
uint32_t PaymentManager::HasPaymentInstrument_Sym::IPCStableHash() { … }
uint32_t PaymentManager::SetPaymentInstrument_Sym::IPCStableHash() { … }
uint32_t PaymentManager::ClearPaymentInstruments_Sym::IPCStableHash() { … }
uint32_t PaymentManager::SetUserHint_Sym::IPCStableHash() { … }
uint32_t PaymentManager::EnableDelegations_Sym::IPCStableHash() { … }
# endif
class PaymentManager_DeletePaymentInstrument_ForwardToCallback
: public mojo::MessageReceiver { … };
class PaymentManager_GetPaymentInstrument_ForwardToCallback
: public mojo::MessageReceiver { … };
class PaymentManager_KeysOfPaymentInstruments_ForwardToCallback
: public mojo::MessageReceiver { … };
class PaymentManager_HasPaymentInstrument_ForwardToCallback
: public mojo::MessageReceiver { … };
class PaymentManager_SetPaymentInstrument_ForwardToCallback
: public mojo::MessageReceiver { … };
class PaymentManager_ClearPaymentInstruments_ForwardToCallback
: public mojo::MessageReceiver { … };
class PaymentManager_EnableDelegations_ForwardToCallback
: public mojo::MessageReceiver { … };
PaymentManagerProxy::PaymentManagerProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void PaymentManagerProxy::Init(
const ::blink::KURL& in_context_url, const WTF::String& in_service_worker_scope) { … }
void PaymentManagerProxy::DeletePaymentInstrument(
const WTF::String& in_instrument_key, DeletePaymentInstrumentCallback callback) { … }
void PaymentManagerProxy::GetPaymentInstrument(
const WTF::String& in_instrument_key, GetPaymentInstrumentCallback callback) { … }
void PaymentManagerProxy::KeysOfPaymentInstruments(
KeysOfPaymentInstrumentsCallback callback) { … }
void PaymentManagerProxy::HasPaymentInstrument(
const WTF::String& in_instrument_key, HasPaymentInstrumentCallback callback) { … }
void PaymentManagerProxy::SetPaymentInstrument(
const WTF::String& in_instrument_key, PaymentInstrumentPtr in_instrument, SetPaymentInstrumentCallback callback) { … }
void PaymentManagerProxy::ClearPaymentInstruments(
ClearPaymentInstrumentsCallback callback) { … }
void PaymentManagerProxy::SetUserHint(
const WTF::String& in_user_hint) { … }
void PaymentManagerProxy::EnableDelegations(
const WTF::Vector<PaymentDelegation>& in_delegations, EnableDelegationsCallback callback) { … }
class PaymentManager_DeletePaymentInstrument_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool PaymentManager_DeletePaymentInstrument_ForwardToCallback::Accept(
mojo::Message* message) { … }
void PaymentManager_DeletePaymentInstrument_ProxyToResponder::Run(
PaymentHandlerStatus in_status) { … }
class PaymentManager_GetPaymentInstrument_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool PaymentManager_GetPaymentInstrument_ForwardToCallback::Accept(
mojo::Message* message) { … }
void PaymentManager_GetPaymentInstrument_ProxyToResponder::Run(
PaymentInstrumentPtr in_instrument, PaymentHandlerStatus in_status) { … }
class PaymentManager_KeysOfPaymentInstruments_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool PaymentManager_KeysOfPaymentInstruments_ForwardToCallback::Accept(
mojo::Message* message) { … }
void PaymentManager_KeysOfPaymentInstruments_ProxyToResponder::Run(
const WTF::Vector<WTF::String>& in_keys, PaymentHandlerStatus in_status) { … }
class PaymentManager_HasPaymentInstrument_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool PaymentManager_HasPaymentInstrument_ForwardToCallback::Accept(
mojo::Message* message) { … }
void PaymentManager_HasPaymentInstrument_ProxyToResponder::Run(
PaymentHandlerStatus in_status) { … }
class PaymentManager_SetPaymentInstrument_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool PaymentManager_SetPaymentInstrument_ForwardToCallback::Accept(
mojo::Message* message) { … }
void PaymentManager_SetPaymentInstrument_ProxyToResponder::Run(
PaymentHandlerStatus in_status) { … }
class PaymentManager_ClearPaymentInstruments_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool PaymentManager_ClearPaymentInstruments_ForwardToCallback::Accept(
mojo::Message* message) { … }
void PaymentManager_ClearPaymentInstruments_ProxyToResponder::Run(
PaymentHandlerStatus in_status) { … }
class PaymentManager_EnableDelegations_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool PaymentManager_EnableDelegations_ForwardToCallback::Accept(
mojo::Message* message) { … }
void PaymentManager_EnableDelegations_ProxyToResponder::Run(
PaymentHandlerStatus in_status) { … }
bool PaymentManagerStubDispatch::Accept(
PaymentManager* impl,
mojo::Message* message) { … }
bool PaymentManagerStubDispatch::AcceptWithResponder(
PaymentManager* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kPaymentManagerValidationInfo[] = …;
bool PaymentManagerRequestValidator::Accept(mojo::Message* message) { … }
bool PaymentManagerResponseValidator::Accept(mojo::Message* message) { … }
const char PaymentHandlerResponseCallback::Name_[] = …;
PaymentHandlerResponseCallback::IPCStableHashFunction PaymentHandlerResponseCallback::MessageToMethodInfo_(mojo::Message& message) { … }
const char* PaymentHandlerResponseCallback::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t PaymentHandlerResponseCallback::OnResponseForAbortPayment_Sym::IPCStableHash() { … }
uint32_t PaymentHandlerResponseCallback::OnResponseForCanMakePayment_Sym::IPCStableHash() { … }
uint32_t PaymentHandlerResponseCallback::OnResponseForPaymentRequest_Sym::IPCStableHash() { … }
# endif
PaymentHandlerResponseCallbackProxy::PaymentHandlerResponseCallbackProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void PaymentHandlerResponseCallbackProxy::OnResponseForAbortPayment(
bool in_payment_aborted) { … }
void PaymentHandlerResponseCallbackProxy::OnResponseForCanMakePayment(
CanMakePaymentResponsePtr in_response) { … }
void PaymentHandlerResponseCallbackProxy::OnResponseForPaymentRequest(
PaymentHandlerResponsePtr in_response) { … }
bool PaymentHandlerResponseCallbackStubDispatch::Accept(
PaymentHandlerResponseCallback* impl,
mojo::Message* message) { … }
bool PaymentHandlerResponseCallbackStubDispatch::AcceptWithResponder(
PaymentHandlerResponseCallback* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kPaymentHandlerResponseCallbackValidationInfo[] = …;
bool PaymentHandlerResponseCallbackRequestValidator::Accept(mojo::Message* message) { … }
}
namespace mojo {
bool StructTraits<::payments::mojom::blink::PaymentInstrument::DataView, ::payments::mojom::blink::PaymentInstrumentPtr>::Read(
::payments::mojom::blink::PaymentInstrument::DataView input,
::payments::mojom::blink::PaymentInstrumentPtr* output) { … }
bool StructTraits<::payments::mojom::blink::CanMakePaymentEventData::DataView, ::payments::mojom::blink::CanMakePaymentEventDataPtr>::Read(
::payments::mojom::blink::CanMakePaymentEventData::DataView input,
::payments::mojom::blink::CanMakePaymentEventDataPtr* output) { … }
bool StructTraits<::payments::mojom::blink::PaymentRequestEventData::DataView, ::payments::mojom::blink::PaymentRequestEventDataPtr>::Read(
::payments::mojom::blink::PaymentRequestEventData::DataView input,
::payments::mojom::blink::PaymentRequestEventDataPtr* output) { … }
bool StructTraits<::payments::mojom::blink::CanMakePaymentResponse::DataView, ::payments::mojom::blink::CanMakePaymentResponsePtr>::Read(
::payments::mojom::blink::CanMakePaymentResponse::DataView input,
::payments::mojom::blink::CanMakePaymentResponsePtr* output) { … }
bool StructTraits<::payments::mojom::blink::PaymentHandlerResponse::DataView, ::payments::mojom::blink::PaymentHandlerResponsePtr>::Read(
::payments::mojom::blink::PaymentHandlerResponse::DataView input,
::payments::mojom::blink::PaymentHandlerResponsePtr* output) { … }
}
namespace payments::mojom::blink {
void PaymentManagerInterceptorForTesting::Init(const ::blink::KURL& context_url, const WTF::String& service_worker_scope) { … }
void PaymentManagerInterceptorForTesting::DeletePaymentInstrument(const WTF::String& instrument_key, DeletePaymentInstrumentCallback callback) { … }
void PaymentManagerInterceptorForTesting::GetPaymentInstrument(const WTF::String& instrument_key, GetPaymentInstrumentCallback callback) { … }
void PaymentManagerInterceptorForTesting::KeysOfPaymentInstruments(KeysOfPaymentInstrumentsCallback callback) { … }
void PaymentManagerInterceptorForTesting::HasPaymentInstrument(const WTF::String& instrument_key, HasPaymentInstrumentCallback callback) { … }
void PaymentManagerInterceptorForTesting::SetPaymentInstrument(const WTF::String& instrument_key, PaymentInstrumentPtr instrument, SetPaymentInstrumentCallback callback) { … }
void PaymentManagerInterceptorForTesting::ClearPaymentInstruments(ClearPaymentInstrumentsCallback callback) { … }
void PaymentManagerInterceptorForTesting::SetUserHint(const WTF::String& user_hint) { … }
void PaymentManagerInterceptorForTesting::EnableDelegations(const WTF::Vector<PaymentDelegation>& delegations, EnableDelegationsCallback callback) { … }
PaymentManagerAsyncWaiter::PaymentManagerAsyncWaiter(
PaymentManager* proxy) : … { … }
PaymentManagerAsyncWaiter::~PaymentManagerAsyncWaiter() = default;
void PaymentManagerAsyncWaiter::DeletePaymentInstrument(
const WTF::String& instrument_key, PaymentHandlerStatus* out_status) { … }
PaymentHandlerStatus PaymentManagerAsyncWaiter::DeletePaymentInstrument(
const WTF::String& instrument_key) { … }
void PaymentManagerAsyncWaiter::GetPaymentInstrument(
const WTF::String& instrument_key, PaymentInstrumentPtr* out_instrument, PaymentHandlerStatus* out_status) { … }
void PaymentManagerAsyncWaiter::KeysOfPaymentInstruments(
WTF::Vector<WTF::String>* out_keys, PaymentHandlerStatus* out_status) { … }
void PaymentManagerAsyncWaiter::HasPaymentInstrument(
const WTF::String& instrument_key, PaymentHandlerStatus* out_status) { … }
PaymentHandlerStatus PaymentManagerAsyncWaiter::HasPaymentInstrument(
const WTF::String& instrument_key) { … }
void PaymentManagerAsyncWaiter::SetPaymentInstrument(
const WTF::String& instrument_key, PaymentInstrumentPtr instrument, PaymentHandlerStatus* out_status) { … }
PaymentHandlerStatus PaymentManagerAsyncWaiter::SetPaymentInstrument(
const WTF::String& instrument_key, PaymentInstrumentPtr instrument) { … }
void PaymentManagerAsyncWaiter::ClearPaymentInstruments(
PaymentHandlerStatus* out_status) { … }
PaymentHandlerStatus PaymentManagerAsyncWaiter::ClearPaymentInstruments(
) { … }
void PaymentManagerAsyncWaiter::EnableDelegations(
const WTF::Vector<PaymentDelegation>& delegations, PaymentHandlerStatus* out_status) { … }
PaymentHandlerStatus PaymentManagerAsyncWaiter::EnableDelegations(
const WTF::Vector<PaymentDelegation>& delegations) { … }
void PaymentHandlerResponseCallbackInterceptorForTesting::OnResponseForAbortPayment(bool payment_aborted) { … }
void PaymentHandlerResponseCallbackInterceptorForTesting::OnResponseForCanMakePayment(CanMakePaymentResponsePtr response) { … }
void PaymentHandlerResponseCallbackInterceptorForTesting::OnResponseForPaymentRequest(PaymentHandlerResponsePtr response) { … }
PaymentHandlerResponseCallbackAsyncWaiter::PaymentHandlerResponseCallbackAsyncWaiter(
PaymentHandlerResponseCallback* proxy) : … { … }
PaymentHandlerResponseCallbackAsyncWaiter::~PaymentHandlerResponseCallbackAsyncWaiter() = default;
}
#if defined(__clang__)
#pragma clang diagnostic pop
#endif