| 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 66362d69ad24ad5e43b0193dec218e96b7c1646d..a12d16cda5a8080a89390b742959eff349cfe920 100644
|
| --- a/third_party/WebKit/Source/modules/payments/PaymentResponse.cpp
|
| +++ b/third_party/WebKit/Source/modules/payments/PaymentResponse.cpp
|
| @@ -9,10 +9,26 @@
|
| #include "modules/payments/PaymentCompleter.h"
|
| #include "wtf/Assertions.h"
|
|
|
| +namespace mojo {
|
| +
|
| +template <>
|
| +struct TypeConverter<blink::CurrencyAmount, blink::mojom::blink::CurrencyAmount> {
|
| + static blink::CurrencyAmount Convert(const blink::mojom::blink::CurrencyAmount& input)
|
| + {
|
| + blink::CurrencyAmount output;
|
| + output.setCurrency(input.currency);
|
| + output.setValue(input.value);
|
| + return output;
|
| + }
|
| +};
|
| +
|
| +} // namespace mojo
|
| +
|
| namespace blink {
|
|
|
| PaymentResponse::PaymentResponse(mojom::blink::PaymentResponsePtr response, PaymentCompleter* paymentCompleter)
|
| : m_methodName(response->method_name)
|
| + , m_totalAmount(response->total_amount->To<CurrencyAmount>())
|
| , m_stringifiedDetails(response->stringified_details)
|
| , m_shippingAddress(response->shipping_address ? new PaymentAddress(std::move(response->shipping_address)) : nullptr)
|
| , m_paymentCompleter(paymentCompleter)
|
|
|