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

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

Issue 2348103002: PaymentRequest: Add support for payerName. (in blink side) (Closed)
Patch Set: PaymentRequest: Add support for payerName. (in blink side) Created 4 years, 3 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"
11 11
12 namespace blink { 12 namespace blink {
13 13
14 PaymentResponse::PaymentResponse(mojom::blink::PaymentResponsePtr response, Paym entCompleter* paymentCompleter) 14 PaymentResponse::PaymentResponse(mojom::blink::PaymentResponsePtr response, Paym entCompleter* paymentCompleter)
15 : m_methodName(response->method_name) 15 : m_methodName(response->method_name)
16 , m_stringifiedDetails(response->stringified_details) 16 , m_stringifiedDetails(response->stringified_details)
17 , m_shippingAddress(response->shipping_address ? new PaymentAddress(std::mov e(response->shipping_address)) : nullptr) 17 , m_shippingAddress(response->shipping_address ? new PaymentAddress(std::mov e(response->shipping_address)) : nullptr)
18 , m_shippingOption(response->shipping_option) 18 , m_shippingOption(response->shipping_option)
19 , m_payerName(response->payer_name)
dcheng 2016/09/20 19:39:09 Can we write a StructTrait to do this mapping rath
19 , m_payerEmail(response->payer_email) 20 , m_payerEmail(response->payer_email)
20 , m_payerPhone(response->payer_phone) 21 , m_payerPhone(response->payer_phone)
21 , m_paymentCompleter(paymentCompleter) 22 , m_paymentCompleter(paymentCompleter)
22 { 23 {
23 DCHECK(m_paymentCompleter); 24 DCHECK(m_paymentCompleter);
24 } 25 }
25 26
26 PaymentResponse::~PaymentResponse() 27 PaymentResponse::~PaymentResponse()
27 { 28 {
28 } 29 }
(...skipping 13 matching lines...) Expand all
42 return m_paymentCompleter->complete(scriptState, convertedResult); 43 return m_paymentCompleter->complete(scriptState, convertedResult);
43 } 44 }
44 45
45 DEFINE_TRACE(PaymentResponse) 46 DEFINE_TRACE(PaymentResponse)
46 { 47 {
47 visitor->trace(m_shippingAddress); 48 visitor->trace(m_shippingAddress);
48 visitor->trace(m_paymentCompleter); 49 visitor->trace(m_paymentCompleter);
49 } 50 }
50 51
51 } // namespace blink 52 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698