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 PaymentResponse_h | 5 #ifndef PaymentResponse_h |
6 #define PaymentResponse_h | 6 #define PaymentResponse_h |
7 | 7 |
8 #include "bindings/core/v8/ScriptPromise.h" | 8 #include "bindings/core/v8/ScriptPromise.h" |
9 #include "bindings/core/v8/ScriptValue.h" | 9 #include "bindings/core/v8/ScriptValue.h" |
10 #include "bindings/core/v8/ScriptWrappable.h" | 10 #include "bindings/core/v8/ScriptWrappable.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 | 24 |
25 class MODULES_EXPORT PaymentResponse final : public GarbageCollectedFinalized<Pa
ymentResponse>, public ScriptWrappable { | 25 class MODULES_EXPORT PaymentResponse final : public GarbageCollectedFinalized<Pa
ymentResponse>, public ScriptWrappable { |
26 DEFINE_WRAPPERTYPEINFO(); | 26 DEFINE_WRAPPERTYPEINFO(); |
27 WTF_MAKE_NONCOPYABLE(PaymentResponse); | 27 WTF_MAKE_NONCOPYABLE(PaymentResponse); |
28 | 28 |
29 public: | 29 public: |
30 PaymentResponse(mojom::blink::PaymentResponsePtr, PaymentCompleter*); | 30 PaymentResponse(mojom::blink::PaymentResponsePtr, PaymentCompleter*); |
31 virtual ~PaymentResponse(); | 31 virtual ~PaymentResponse(); |
32 | 32 |
33 const String& methodName() const { return m_methodName; } | 33 const String& methodName() const { return m_methodName; } |
34 void totalAmount(CurrencyAmount& result) const { result = m_totalAmount; } | |
35 ScriptValue details(ScriptState*, ExceptionState&) const; | 34 ScriptValue details(ScriptState*, ExceptionState&) const; |
36 PaymentAddress* shippingAddress() const { return m_shippingAddress.get(); } | 35 PaymentAddress* shippingAddress() const { return m_shippingAddress.get(); } |
37 const String& payerEmail() const { return m_payerEmail; } | 36 const String& payerEmail() const { return m_payerEmail; } |
38 const String& payerPhone() const { return m_payerPhone; } | 37 const String& payerPhone() const { return m_payerPhone; } |
39 | 38 |
40 ScriptPromise complete(ScriptState*, bool success); | 39 ScriptPromise complete(ScriptState*, bool success); |
41 | 40 |
42 DECLARE_TRACE(); | 41 DECLARE_TRACE(); |
43 | 42 |
44 private: | 43 private: |
45 String m_methodName; | 44 String m_methodName; |
46 CurrencyAmount m_totalAmount; | |
47 String m_stringifiedDetails; | 45 String m_stringifiedDetails; |
48 Member<PaymentAddress> m_shippingAddress; | 46 Member<PaymentAddress> m_shippingAddress; |
49 String m_payerEmail; | 47 String m_payerEmail; |
50 String m_payerPhone; | 48 String m_payerPhone; |
51 Member<PaymentCompleter> m_paymentCompleter; | 49 Member<PaymentCompleter> m_paymentCompleter; |
52 }; | 50 }; |
53 | 51 |
54 } // namespace blink | 52 } // namespace blink |
55 | 53 |
56 #endif // PaymentResponse_h | 54 #endif // PaymentResponse_h |
OLD | NEW |