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 15 matching lines...) Expand all Loading... |
26 WTF_MAKE_NONCOPYABLE(PaymentResponse); | 26 WTF_MAKE_NONCOPYABLE(PaymentResponse); |
27 | 27 |
28 public: | 28 public: |
29 PaymentResponse(mojom::blink::PaymentResponsePtr, PaymentCompleter*); | 29 PaymentResponse(mojom::blink::PaymentResponsePtr, PaymentCompleter*); |
30 virtual ~PaymentResponse(); | 30 virtual ~PaymentResponse(); |
31 | 31 |
32 const String& methodName() const { return m_methodName; } | 32 const String& methodName() const { return m_methodName; } |
33 ScriptValue details(ScriptState*, ExceptionState&) const; | 33 ScriptValue details(ScriptState*, ExceptionState&) const; |
34 PaymentAddress* shippingAddress() const { return m_shippingAddress.get(); } | 34 PaymentAddress* shippingAddress() const { return m_shippingAddress.get(); } |
35 | 35 |
36 ScriptPromise complete(ScriptState*, bool success); | 36 ScriptPromise complete(ScriptState*, const String& result = ""); |
37 | 37 |
38 DECLARE_TRACE(); | 38 DECLARE_TRACE(); |
39 | 39 |
40 private: | 40 private: |
41 String m_methodName; | 41 String m_methodName; |
42 String m_stringifiedDetails; | 42 String m_stringifiedDetails; |
43 Member<PaymentAddress> m_shippingAddress; | 43 Member<PaymentAddress> m_shippingAddress; |
44 Member<PaymentCompleter> m_paymentCompleter; | 44 Member<PaymentCompleter> m_paymentCompleter; |
45 }; | 45 }; |
46 | 46 |
47 } // namespace blink | 47 } // namespace blink |
48 | 48 |
49 #endif // PaymentResponse_h | 49 #endif // PaymentResponse_h |
OLD | NEW |