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 #ifndef PaymentAddress_h | 5 #ifndef PaymentAddress_h |
6 #define PaymentAddress_h | 6 #define PaymentAddress_h |
7 | 7 |
| 8 #include "bindings/core/v8/ScriptValue.h" |
8 #include "bindings/core/v8/ScriptWrappable.h" | 9 #include "bindings/core/v8/ScriptWrappable.h" |
9 #include "modules/ModulesExport.h" | 10 #include "modules/ModulesExport.h" |
10 #include "platform/heap/Handle.h" | 11 #include "platform/heap/Handle.h" |
11 #include "public/platform/modules/payments/payment_request.mojom-blink.h" | 12 #include "public/platform/modules/payments/payment_request.mojom-blink.h" |
12 #include "wtf/Noncopyable.h" | 13 #include "wtf/Noncopyable.h" |
13 #include "wtf/Vector.h" | 14 #include "wtf/Vector.h" |
14 #include "wtf/text/WTFString.h" | 15 #include "wtf/text/WTFString.h" |
15 | 16 |
16 namespace blink { | 17 namespace blink { |
17 | 18 |
18 class MODULES_EXPORT PaymentAddress final : public GarbageCollectedFinalized<Pay
mentAddress>, public ScriptWrappable { | 19 class MODULES_EXPORT PaymentAddress final : public GarbageCollectedFinalized<Pay
mentAddress>, public ScriptWrappable { |
19 DEFINE_WRAPPERTYPEINFO(); | 20 DEFINE_WRAPPERTYPEINFO(); |
20 WTF_MAKE_NONCOPYABLE(PaymentAddress); | 21 WTF_MAKE_NONCOPYABLE(PaymentAddress); |
21 | 22 |
22 public: | 23 public: |
23 explicit PaymentAddress(mojom::blink::PaymentAddressPtr); | 24 explicit PaymentAddress(mojom::blink::PaymentAddressPtr); |
24 virtual ~PaymentAddress(); | 25 virtual ~PaymentAddress(); |
25 | 26 |
| 27 ScriptValue toJSONForBinding(ScriptState*) const; |
| 28 |
26 const String& country() const { return m_country; } | 29 const String& country() const { return m_country; } |
27 const Vector<String>& addressLine() const { return m_addressLine; } | 30 const Vector<String>& addressLine() const { return m_addressLine; } |
28 const String& region() const { return m_region; } | 31 const String& region() const { return m_region; } |
29 const String& city() const { return m_city; } | 32 const String& city() const { return m_city; } |
30 const String& dependentLocality() const { return m_dependentLocality; } | 33 const String& dependentLocality() const { return m_dependentLocality; } |
31 const String& postalCode() const { return m_postalCode; } | 34 const String& postalCode() const { return m_postalCode; } |
32 const String& sortingCode() const { return m_sortingCode; } | 35 const String& sortingCode() const { return m_sortingCode; } |
33 const String& languageCode() const { return m_languageCode; } | 36 const String& languageCode() const { return m_languageCode; } |
34 const String& organization() const { return m_organization; } | 37 const String& organization() const { return m_organization; } |
35 const String& recipient() const { return m_recipient; } | 38 const String& recipient() const { return m_recipient; } |
(...skipping 13 matching lines...) Expand all Loading... |
49 String m_languageCode; | 52 String m_languageCode; |
50 String m_organization; | 53 String m_organization; |
51 String m_recipient; | 54 String m_recipient; |
52 String m_careOf; | 55 String m_careOf; |
53 String m_phone; | 56 String m_phone; |
54 }; | 57 }; |
55 | 58 |
56 } // namespace blink | 59 } // namespace blink |
57 | 60 |
58 #endif // PaymentAddress_h | 61 #endif // PaymentAddress_h |
OLD | NEW |