#include "third_party/blink/renderer/modules/payments/payment_response.h"
#include <utility>
#include "base/logging.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_core.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_object_builder.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_payment_validation_errors.h"
#include "third_party/blink/renderer/core/execution_context/execution_context.h"
#include "third_party/blink/renderer/modules/credentialmanagement/authenticator_assertion_response.h"
#include "third_party/blink/renderer/modules/credentialmanagement/credential_manager_type_converters.h"
#include "third_party/blink/renderer/modules/credentialmanagement/public_key_credential.h"
#include "third_party/blink/renderer/modules/payments/payment_address.h"
#include "third_party/blink/renderer/modules/payments/payment_state_resolver.h"
#include "third_party/blink/renderer/platform/bindings/exception_state.h"
#include "third_party/blink/renderer/platform/bindings/script_state.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
namespace blink {
namespace {
v8::Local<v8::Value> BuildDetails(
ScriptState* script_state,
const String& json,
mojom::blink::GetAssertionAuthenticatorResponsePtr
get_assertion_authentication_response) { … }
}
PaymentResponse::PaymentResponse(
ScriptState* script_state,
payments::mojom::blink::PaymentResponsePtr response,
PaymentAddress* shipping_address,
PaymentStateResolver* payment_state_resolver,
const String& request_id)
: … { … }
PaymentResponse::~PaymentResponse() = default;
void PaymentResponse::Update(
ScriptState* script_state,
payments::mojom::blink::PaymentResponsePtr response,
PaymentAddress* shipping_address) { … }
void PaymentResponse::UpdatePayerDetail(
payments::mojom::blink::PayerDetailPtr detail) { … }
ScriptValue PaymentResponse::toJSONForBinding(ScriptState* script_state) const { … }
ScriptValue PaymentResponse::details(ScriptState* script_state) const { … }
ScriptPromise<IDLUndefined> PaymentResponse::complete(
ScriptState* script_state,
const String& result,
ExceptionState& exception_state) { … }
ScriptPromise<IDLUndefined> PaymentResponse::retry(
ScriptState* script_state,
const PaymentValidationErrors* error_fields,
ExceptionState& exception_state) { … }
bool PaymentResponse::HasPendingActivity() const { … }
const AtomicString& PaymentResponse::InterfaceName() const { … }
ExecutionContext* PaymentResponse::GetExecutionContext() const { … }
void PaymentResponse::Trace(Visitor* visitor) const { … }
}