#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-private-field"
#endif
#include "third_party/blink/public/mojom/payments/payment_request.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_request.mojom-params-data.h"
#include "third_party/blink/public/mojom/payments/payment_request.mojom-shared-message-ids.h"
#include "third_party/blink/public/mojom/payments/payment_request.mojom-blink-import-headers.h"
#include "third_party/blink/public/mojom/payments/payment_request.mojom-blink-test-utils.h"
#include "mojo/public/cpp/bindings/lib/wtf_serialization.h"
namespace payments::mojom::blink {
PaymentResponse::PaymentResponse()
: … { … }
PaymentResponse::PaymentResponse(
const WTF::String& method_name_in,
const WTF::String& stringified_details_in,
::payments::mojom::blink::PaymentAddressPtr shipping_address_in,
const WTF::String& shipping_option_in,
PayerDetailPtr payer_in,
::blink::mojom::blink::GetAssertionAuthenticatorResponsePtr get_assertion_authenticator_response_in)
: … { … }
PaymentResponse::~PaymentResponse() = default;
void PaymentResponse::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool PaymentResponse::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
PayerDetail::PayerDetail()
: … { … }
PayerDetail::PayerDetail(
const WTF::String& email_in,
const WTF::String& name_in,
const WTF::String& phone_in)
: … { … }
PayerDetail::~PayerDetail() = default;
void PayerDetail::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool PayerDetail::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
PaymentItem::PaymentItem()
: … { … }
PaymentItem::PaymentItem(
const WTF::String& label_in,
::payments::mojom::blink::PaymentCurrencyAmountPtr amount_in,
bool pending_in)
: … { … }
PaymentItem::~PaymentItem() = default;
size_t PaymentItem::Hash(size_t seed) const { … }
void PaymentItem::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool PaymentItem::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
PaymentShippingOption::PaymentShippingOption()
: … { … }
PaymentShippingOption::PaymentShippingOption(
const WTF::String& id_in,
const WTF::String& label_in,
::payments::mojom::blink::PaymentCurrencyAmountPtr amount_in,
bool selected_in)
: … { … }
PaymentShippingOption::~PaymentShippingOption() = default;
size_t PaymentShippingOption::Hash(size_t seed) const { … }
void PaymentShippingOption::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool PaymentShippingOption::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
SecurePaymentConfirmationRequest::SecurePaymentConfirmationRequest()
: … { … }
SecurePaymentConfirmationRequest::SecurePaymentConfirmationRequest(
WTF::Vector<WTF::Vector<uint8_t>> credential_ids_in,
WTF::Vector<uint8_t> challenge_in,
::blink::mojom::blink::PaymentCredentialInstrumentPtr instrument_in,
std::optional<::base::TimeDelta> timeout_in,
const ::scoped_refptr<const ::blink::SecurityOrigin>& payee_origin_in,
const WTF::String& payee_name_in,
const WTF::String& rp_id_in,
::blink::mojom::blink::AuthenticationExtensionsClientInputsPtr extensions_in,
bool show_opt_out_in,
NetworkOrIssuerInformationPtr network_info_in,
NetworkOrIssuerInformationPtr issuer_info_in)
: … { … }
SecurePaymentConfirmationRequest::~SecurePaymentConfirmationRequest() = default;
void SecurePaymentConfirmationRequest::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool SecurePaymentConfirmationRequest::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
NetworkOrIssuerInformation::NetworkOrIssuerInformation()
: … { … }
NetworkOrIssuerInformation::NetworkOrIssuerInformation(
const WTF::String& name_in,
const ::blink::KURL& icon_in)
: … { … }
NetworkOrIssuerInformation::~NetworkOrIssuerInformation() = default;
void NetworkOrIssuerInformation::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool NetworkOrIssuerInformation::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
PaymentMethodData::PaymentMethodData()
: … { … }
PaymentMethodData::PaymentMethodData(
const WTF::String& supported_method_in,
const WTF::String& stringified_data_in,
AndroidPayEnvironment environment_in,
int32_t min_google_play_services_version_in,
int32_t api_version_in,
WTF::Vector<BasicCardNetwork> supported_networks_in,
SecurePaymentConfirmationRequestPtr secure_payment_confirmation_in)
: … { … }
PaymentMethodData::~PaymentMethodData() = default;
void PaymentMethodData::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool PaymentMethodData::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
PaymentDetailsModifier::PaymentDetailsModifier()
: … { … }
PaymentDetailsModifier::PaymentDetailsModifier(
PaymentItemPtr total_in,
WTF::Vector<PaymentItemPtr> additional_display_items_in,
PaymentMethodDataPtr method_data_in)
: … { … }
PaymentDetailsModifier::~PaymentDetailsModifier() = default;
void PaymentDetailsModifier::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool PaymentDetailsModifier::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
PaymentDetails::PaymentDetails()
: … { … }
PaymentDetails::PaymentDetails(
PaymentItemPtr total_in,
std::optional<WTF::Vector<PaymentItemPtr>> display_items_in,
std::optional<WTF::Vector<PaymentShippingOptionPtr>> shipping_options_in,
std::optional<WTF::Vector<PaymentDetailsModifierPtr>> modifiers_in,
const WTF::String& error_in,
::payments::mojom::blink::AddressErrorsPtr shipping_address_errors_in,
const WTF::String& id_in,
const WTF::String& stringified_payment_method_errors_in)
: … { … }
PaymentDetails::~PaymentDetails() = default;
void PaymentDetails::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool PaymentDetails::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
PaymentOptions::PaymentOptions()
: … { … }
PaymentOptions::PaymentOptions(
bool request_payer_name_in,
bool request_payer_email_in,
bool request_payer_phone_in,
bool request_shipping_in,
PaymentShippingType shipping_type_in)
: … { … }
PaymentOptions::~PaymentOptions() = default;
size_t PaymentOptions::Hash(size_t seed) const { … }
void PaymentOptions::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool PaymentOptions::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
const char PaymentRequestClient::Name_[] = …;
PaymentRequestClient::IPCStableHashFunction PaymentRequestClient::MessageToMethodInfo_(mojo::Message& message) { … }
const char* PaymentRequestClient::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t PaymentRequestClient::OnPaymentMethodChange_Sym::IPCStableHash() { … }
uint32_t PaymentRequestClient::OnShippingAddressChange_Sym::IPCStableHash() { … }
uint32_t PaymentRequestClient::OnShippingOptionChange_Sym::IPCStableHash() { … }
uint32_t PaymentRequestClient::OnPayerDetailChange_Sym::IPCStableHash() { … }
uint32_t PaymentRequestClient::OnPaymentResponse_Sym::IPCStableHash() { … }
uint32_t PaymentRequestClient::OnError_Sym::IPCStableHash() { … }
uint32_t PaymentRequestClient::OnComplete_Sym::IPCStableHash() { … }
uint32_t PaymentRequestClient::OnAbort_Sym::IPCStableHash() { … }
uint32_t PaymentRequestClient::OnCanMakePayment_Sym::IPCStableHash() { … }
uint32_t PaymentRequestClient::OnHasEnrolledInstrument_Sym::IPCStableHash() { … }
uint32_t PaymentRequestClient::WarnNoFavicon_Sym::IPCStableHash() { … }
uint32_t PaymentRequestClient::AllowConnectToSource_Sym::IPCStableHash() { … }
# endif
class PaymentRequestClient_AllowConnectToSource_ForwardToCallback
: public mojo::MessageReceiver { … };
PaymentRequestClientProxy::PaymentRequestClientProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void PaymentRequestClientProxy::OnPaymentMethodChange(
const WTF::String& in_method_name, const WTF::String& in_stringified_details) { … }
void PaymentRequestClientProxy::OnShippingAddressChange(
::payments::mojom::blink::PaymentAddressPtr in_address) { … }
void PaymentRequestClientProxy::OnShippingOptionChange(
const WTF::String& in_shipping_option_id) { … }
void PaymentRequestClientProxy::OnPayerDetailChange(
PayerDetailPtr in_detail) { … }
void PaymentRequestClientProxy::OnPaymentResponse(
PaymentResponsePtr in_response) { … }
void PaymentRequestClientProxy::OnError(
PaymentErrorReason in_error, const WTF::String& in_error_message) { … }
void PaymentRequestClientProxy::OnComplete(
) { … }
void PaymentRequestClientProxy::OnAbort(
bool in_aborted_successfully) { … }
void PaymentRequestClientProxy::OnCanMakePayment(
CanMakePaymentQueryResult in_result) { … }
void PaymentRequestClientProxy::OnHasEnrolledInstrument(
HasEnrolledInstrumentQueryResult in_result) { … }
void PaymentRequestClientProxy::WarnNoFavicon(
) { … }
void PaymentRequestClientProxy::AllowConnectToSource(
const ::blink::KURL& in_url, const ::blink::KURL& in_url_before_redirects, bool in_did_follow_redirect, AllowConnectToSourceCallback callback) { … }
class PaymentRequestClient_AllowConnectToSource_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool PaymentRequestClient_AllowConnectToSource_ForwardToCallback::Accept(
mojo::Message* message) { … }
void PaymentRequestClient_AllowConnectToSource_ProxyToResponder::Run(
bool in_allow) { … }
bool PaymentRequestClientStubDispatch::Accept(
PaymentRequestClient* impl,
mojo::Message* message) { … }
bool PaymentRequestClientStubDispatch::AcceptWithResponder(
PaymentRequestClient* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kPaymentRequestClientValidationInfo[] = …;
bool PaymentRequestClientRequestValidator::Accept(mojo::Message* message) { … }
bool PaymentRequestClientResponseValidator::Accept(mojo::Message* message) { … }
const char PaymentRequest::Name_[] = …;
PaymentRequest::IPCStableHashFunction PaymentRequest::MessageToMethodInfo_(mojo::Message& message) { … }
const char* PaymentRequest::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t PaymentRequest::Init_Sym::IPCStableHash() { … }
uint32_t PaymentRequest::Show_Sym::IPCStableHash() { … }
uint32_t PaymentRequest::UpdateWith_Sym::IPCStableHash() { … }
uint32_t PaymentRequest::OnPaymentDetailsNotUpdated_Sym::IPCStableHash() { … }
uint32_t PaymentRequest::Abort_Sym::IPCStableHash() { … }
uint32_t PaymentRequest::Complete_Sym::IPCStableHash() { … }
uint32_t PaymentRequest::Retry_Sym::IPCStableHash() { … }
uint32_t PaymentRequest::CanMakePayment_Sym::IPCStableHash() { … }
uint32_t PaymentRequest::HasEnrolledInstrument_Sym::IPCStableHash() { … }
# endif
PaymentRequestProxy::PaymentRequestProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void PaymentRequestProxy::Init(
::mojo::PendingRemote<PaymentRequestClient> in_client, WTF::Vector<PaymentMethodDataPtr> in_method_data, PaymentDetailsPtr in_details, PaymentOptionsPtr in_options) { … }
void PaymentRequestProxy::Show(
bool in_wait_for_updated_details, bool in_had_user_activation) { … }
void PaymentRequestProxy::UpdateWith(
PaymentDetailsPtr in_details) { … }
void PaymentRequestProxy::OnPaymentDetailsNotUpdated(
) { … }
void PaymentRequestProxy::Abort(
) { … }
void PaymentRequestProxy::Complete(
PaymentComplete in_result) { … }
void PaymentRequestProxy::Retry(
::payments::mojom::blink::PaymentValidationErrorsPtr in_errors) { … }
void PaymentRequestProxy::CanMakePayment(
) { … }
void PaymentRequestProxy::HasEnrolledInstrument(
) { … }
bool PaymentRequestStubDispatch::Accept(
PaymentRequest* impl,
mojo::Message* message) { … }
bool PaymentRequestStubDispatch::AcceptWithResponder(
PaymentRequest* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kPaymentRequestValidationInfo[] = …;
bool PaymentRequestRequestValidator::Accept(mojo::Message* message) { … }
}
namespace mojo {
bool StructTraits<::payments::mojom::blink::PaymentResponse::DataView, ::payments::mojom::blink::PaymentResponsePtr>::Read(
::payments::mojom::blink::PaymentResponse::DataView input,
::payments::mojom::blink::PaymentResponsePtr* output) { … }
bool StructTraits<::payments::mojom::blink::PayerDetail::DataView, ::payments::mojom::blink::PayerDetailPtr>::Read(
::payments::mojom::blink::PayerDetail::DataView input,
::payments::mojom::blink::PayerDetailPtr* output) { … }
bool StructTraits<::payments::mojom::blink::PaymentItem::DataView, ::payments::mojom::blink::PaymentItemPtr>::Read(
::payments::mojom::blink::PaymentItem::DataView input,
::payments::mojom::blink::PaymentItemPtr* output) { … }
bool StructTraits<::payments::mojom::blink::PaymentShippingOption::DataView, ::payments::mojom::blink::PaymentShippingOptionPtr>::Read(
::payments::mojom::blink::PaymentShippingOption::DataView input,
::payments::mojom::blink::PaymentShippingOptionPtr* output) { … }
bool StructTraits<::payments::mojom::blink::SecurePaymentConfirmationRequest::DataView, ::payments::mojom::blink::SecurePaymentConfirmationRequestPtr>::Read(
::payments::mojom::blink::SecurePaymentConfirmationRequest::DataView input,
::payments::mojom::blink::SecurePaymentConfirmationRequestPtr* output) { … }
bool StructTraits<::payments::mojom::blink::NetworkOrIssuerInformation::DataView, ::payments::mojom::blink::NetworkOrIssuerInformationPtr>::Read(
::payments::mojom::blink::NetworkOrIssuerInformation::DataView input,
::payments::mojom::blink::NetworkOrIssuerInformationPtr* output) { … }
bool StructTraits<::payments::mojom::blink::PaymentMethodData::DataView, ::payments::mojom::blink::PaymentMethodDataPtr>::Read(
::payments::mojom::blink::PaymentMethodData::DataView input,
::payments::mojom::blink::PaymentMethodDataPtr* output) { … }
bool StructTraits<::payments::mojom::blink::PaymentDetailsModifier::DataView, ::payments::mojom::blink::PaymentDetailsModifierPtr>::Read(
::payments::mojom::blink::PaymentDetailsModifier::DataView input,
::payments::mojom::blink::PaymentDetailsModifierPtr* output) { … }
bool StructTraits<::payments::mojom::blink::PaymentDetails::DataView, ::payments::mojom::blink::PaymentDetailsPtr>::Read(
::payments::mojom::blink::PaymentDetails::DataView input,
::payments::mojom::blink::PaymentDetailsPtr* output) { … }
bool StructTraits<::payments::mojom::blink::PaymentOptions::DataView, ::payments::mojom::blink::PaymentOptionsPtr>::Read(
::payments::mojom::blink::PaymentOptions::DataView input,
::payments::mojom::blink::PaymentOptionsPtr* output) { … }
}
namespace payments::mojom::blink {
void PaymentRequestClientInterceptorForTesting::OnPaymentMethodChange(const WTF::String& method_name, const WTF::String& stringified_details) { … }
void PaymentRequestClientInterceptorForTesting::OnShippingAddressChange(::payments::mojom::blink::PaymentAddressPtr address) { … }
void PaymentRequestClientInterceptorForTesting::OnShippingOptionChange(const WTF::String& shipping_option_id) { … }
void PaymentRequestClientInterceptorForTesting::OnPayerDetailChange(PayerDetailPtr detail) { … }
void PaymentRequestClientInterceptorForTesting::OnPaymentResponse(PaymentResponsePtr response) { … }
void PaymentRequestClientInterceptorForTesting::OnError(PaymentErrorReason error, const WTF::String& error_message) { … }
void PaymentRequestClientInterceptorForTesting::OnComplete() { … }
void PaymentRequestClientInterceptorForTesting::OnAbort(bool aborted_successfully) { … }
void PaymentRequestClientInterceptorForTesting::OnCanMakePayment(CanMakePaymentQueryResult result) { … }
void PaymentRequestClientInterceptorForTesting::OnHasEnrolledInstrument(HasEnrolledInstrumentQueryResult result) { … }
void PaymentRequestClientInterceptorForTesting::WarnNoFavicon() { … }
void PaymentRequestClientInterceptorForTesting::AllowConnectToSource(const ::blink::KURL& url, const ::blink::KURL& url_before_redirects, bool did_follow_redirect, AllowConnectToSourceCallback callback) { … }
PaymentRequestClientAsyncWaiter::PaymentRequestClientAsyncWaiter(
PaymentRequestClient* proxy) : … { … }
PaymentRequestClientAsyncWaiter::~PaymentRequestClientAsyncWaiter() = default;
void PaymentRequestClientAsyncWaiter::AllowConnectToSource(
const ::blink::KURL& url, const ::blink::KURL& url_before_redirects, bool did_follow_redirect, bool* out_allow) { … }
bool PaymentRequestClientAsyncWaiter::AllowConnectToSource(
const ::blink::KURL& url, const ::blink::KURL& url_before_redirects, bool did_follow_redirect) { … }
void PaymentRequestInterceptorForTesting::Init(::mojo::PendingRemote<PaymentRequestClient> client, WTF::Vector<PaymentMethodDataPtr> method_data, PaymentDetailsPtr details, PaymentOptionsPtr options) { … }
void PaymentRequestInterceptorForTesting::Show(bool wait_for_updated_details, bool had_user_activation) { … }
void PaymentRequestInterceptorForTesting::UpdateWith(PaymentDetailsPtr details) { … }
void PaymentRequestInterceptorForTesting::OnPaymentDetailsNotUpdated() { … }
void PaymentRequestInterceptorForTesting::Abort() { … }
void PaymentRequestInterceptorForTesting::Complete(PaymentComplete result) { … }
void PaymentRequestInterceptorForTesting::Retry(::payments::mojom::blink::PaymentValidationErrorsPtr errors) { … }
void PaymentRequestInterceptorForTesting::CanMakePayment() { … }
void PaymentRequestInterceptorForTesting::HasEnrolledInstrument() { … }
PaymentRequestAsyncWaiter::PaymentRequestAsyncWaiter(
PaymentRequest* proxy) : … { … }
PaymentRequestAsyncWaiter::~PaymentRequestAsyncWaiter() = default;
}
#if defined(__clang__)
#pragma clang diagnostic pop
#endif