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

Side by Side Diff: third_party/WebKit/Source/modules/payments/PaymentResponse.cpp

Issue 2073603002: Add shippingOption to PaymentResponse (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase #2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "modules/payments/PaymentResponse.h" 5 #include "modules/payments/PaymentResponse.h"
6 6
7 #include "bindings/core/v8/JSONValuesForV8.h" 7 #include "bindings/core/v8/JSONValuesForV8.h"
8 #include "modules/payments/PaymentAddress.h" 8 #include "modules/payments/PaymentAddress.h"
9 #include "modules/payments/PaymentCompleter.h" 9 #include "modules/payments/PaymentCompleter.h"
10 #include "wtf/Assertions.h" 10 #include "wtf/Assertions.h"
(...skipping 13 matching lines...) Expand all
24 24
25 } // namespace mojo 25 } // namespace mojo
26 26
27 namespace blink { 27 namespace blink {
28 28
29 PaymentResponse::PaymentResponse(mojom::blink::PaymentResponsePtr response, Paym entCompleter* paymentCompleter) 29 PaymentResponse::PaymentResponse(mojom::blink::PaymentResponsePtr response, Paym entCompleter* paymentCompleter)
30 : m_methodName(response->method_name) 30 : m_methodName(response->method_name)
31 , m_totalAmount(response->total_amount->To<PaymentCurrencyAmount>()) 31 , m_totalAmount(response->total_amount->To<PaymentCurrencyAmount>())
32 , m_stringifiedDetails(response->stringified_details) 32 , m_stringifiedDetails(response->stringified_details)
33 , m_shippingAddress(response->shipping_address ? new PaymentAddress(std::mov e(response->shipping_address)) : nullptr) 33 , m_shippingAddress(response->shipping_address ? new PaymentAddress(std::mov e(response->shipping_address)) : nullptr)
34 , m_shippingOption(response->shipping_option)
34 , m_payerEmail(response->payer_email) 35 , m_payerEmail(response->payer_email)
35 , m_payerPhone(response->payer_phone) 36 , m_payerPhone(response->payer_phone)
36 , m_paymentCompleter(paymentCompleter) 37 , m_paymentCompleter(paymentCompleter)
37 { 38 {
38 DCHECK(m_paymentCompleter); 39 DCHECK(m_paymentCompleter);
39 } 40 }
40 41
41 PaymentResponse::~PaymentResponse() 42 PaymentResponse::~PaymentResponse()
42 { 43 {
43 } 44 }
(...skipping 13 matching lines...) Expand all
57 return m_paymentCompleter->complete(scriptState, convertedResult); 58 return m_paymentCompleter->complete(scriptState, convertedResult);
58 } 59 }
59 60
60 DEFINE_TRACE(PaymentResponse) 61 DEFINE_TRACE(PaymentResponse)
61 { 62 {
62 visitor->trace(m_shippingAddress); 63 visitor->trace(m_shippingAddress);
63 visitor->trace(m_paymentCompleter); 64 visitor->trace(m_paymentCompleter);
64 } 65 }
65 66
66 } // namespace blink 67 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698