OLD | NEW |
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/PaymentAddress.h" | 5 #include "modules/payments/PaymentAddress.h" |
6 | 6 |
7 #include "bindings/core/v8/V8ObjectBuilder.h" | 7 #include "bindings/core/v8/V8ObjectBuilder.h" |
8 #include "wtf/text/StringBuilder.h" | 8 #include "wtf/text/StringBuilder.h" |
9 | 9 |
10 namespace blink { | 10 namespace blink { |
11 | 11 |
12 PaymentAddress::PaymentAddress(mojom::blink::PaymentAddressPtr address) | 12 PaymentAddress::PaymentAddress(mojom::blink::PaymentAddressPtr address) |
13 : m_country(address->country), | 13 : m_country(address->country), |
14 m_addressLine(address->address_line.PassStorage()), | 14 m_addressLine(address->address_line), |
15 m_region(address->region), | 15 m_region(address->region), |
16 m_city(address->city), | 16 m_city(address->city), |
17 m_dependentLocality(address->dependent_locality), | 17 m_dependentLocality(address->dependent_locality), |
18 m_postalCode(address->postal_code), | 18 m_postalCode(address->postal_code), |
19 m_sortingCode(address->sorting_code), | 19 m_sortingCode(address->sorting_code), |
20 m_languageCode(address->language_code), | 20 m_languageCode(address->language_code), |
21 m_organization(address->organization), | 21 m_organization(address->organization), |
22 m_recipient(address->recipient), | 22 m_recipient(address->recipient), |
23 m_phone(address->phone) { | 23 m_phone(address->phone) { |
24 if (!m_languageCode.isEmpty() && !address->script_code.isEmpty()) { | 24 if (!m_languageCode.isEmpty() && !address->script_code.isEmpty()) { |
(...skipping 17 matching lines...) Expand all Loading... |
42 result.addString("postalCode", postalCode()); | 42 result.addString("postalCode", postalCode()); |
43 result.addString("sortingCode", sortingCode()); | 43 result.addString("sortingCode", sortingCode()); |
44 result.addString("languageCode", languageCode()); | 44 result.addString("languageCode", languageCode()); |
45 result.addString("organization", organization()); | 45 result.addString("organization", organization()); |
46 result.addString("recipient", recipient()); | 46 result.addString("recipient", recipient()); |
47 result.addString("phone", phone()); | 47 result.addString("phone", phone()); |
48 return result.scriptValue(); | 48 return result.scriptValue(); |
49 } | 49 } |
50 | 50 |
51 } // namespace blink | 51 } // namespace blink |
OLD | NEW |