Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(197)

Unified Diff: third_party/WebKit/Source/modules/payments/PaymentResponse.cpp

Issue 2038333002: PaymentRequest: Provide shippingAddress in PaymentResponse. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/payments/PaymentResponse.cpp
diff --git a/third_party/WebKit/Source/modules/payments/PaymentResponse.cpp b/third_party/WebKit/Source/modules/payments/PaymentResponse.cpp
index 9555b8faf972198f583a9f3e42f82f755841be12..66362d69ad24ad5e43b0193dec218e96b7c1646d 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentResponse.cpp
+++ b/third_party/WebKit/Source/modules/payments/PaymentResponse.cpp
@@ -5,6 +5,7 @@
#include "modules/payments/PaymentResponse.h"
#include "bindings/core/v8/JSONValuesForV8.h"
+#include "modules/payments/PaymentAddress.h"
#include "modules/payments/PaymentCompleter.h"
#include "wtf/Assertions.h"
@@ -13,6 +14,7 @@ namespace blink {
PaymentResponse::PaymentResponse(mojom::blink::PaymentResponsePtr response, PaymentCompleter* paymentCompleter)
: m_methodName(response->method_name)
, m_stringifiedDetails(response->stringified_details)
+ , m_shippingAddress(response->shipping_address ? new PaymentAddress(std::move(response->shipping_address)) : nullptr)
, m_paymentCompleter(paymentCompleter)
{
DCHECK(m_paymentCompleter);
@@ -34,6 +36,7 @@ ScriptPromise PaymentResponse::complete(ScriptState* scriptState, bool success)
DEFINE_TRACE(PaymentResponse)
{
+ visitor->trace(m_shippingAddress);
visitor->trace(m_paymentCompleter);
}

Powered by Google App Engine
This is Rietveld 408576698