Chromium Code Reviews| 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 11 matching lines...) Expand all Loading... | |
| 22 class PaymentCompleter; | 22 class PaymentCompleter; |
| 23 class ScriptState; | 23 class ScriptState; |
| 24 | 24 |
| 25 class MODULES_EXPORT PaymentResponse final | 25 class MODULES_EXPORT PaymentResponse final |
| 26 : public GarbageCollectedFinalized<PaymentResponse>, | 26 : public GarbageCollectedFinalized<PaymentResponse>, |
| 27 public ScriptWrappable { | 27 public ScriptWrappable { |
| 28 DEFINE_WRAPPERTYPEINFO(); | 28 DEFINE_WRAPPERTYPEINFO(); |
| 29 WTF_MAKE_NONCOPYABLE(PaymentResponse); | 29 WTF_MAKE_NONCOPYABLE(PaymentResponse); |
| 30 | 30 |
| 31 public: | 31 public: |
| 32 PaymentResponse(payments::mojom::blink::PaymentResponsePtr, | 32 PaymentResponse(payments::mojom::blink::PaymentResponsePtr, |
|
please use gerrit instead
2017/03/27 16:22:36
Pass the "id" into this constructor, please.
rwlbuis
2017/03/27 20:45:29
Done.
| |
| 33 PaymentCompleter*); | 33 PaymentCompleter*); |
| 34 virtual ~PaymentResponse(); | 34 virtual ~PaymentResponse(); |
| 35 | 35 |
| 36 ScriptValue toJSONForBinding(ScriptState*) const; | 36 ScriptValue toJSONForBinding(ScriptState*) const; |
| 37 | 37 |
| 38 const String& requestId() const { return m_requestId; } | |
| 38 const String& methodName() const { return m_methodName; } | 39 const String& methodName() const { return m_methodName; } |
| 39 ScriptValue details(ScriptState*, ExceptionState&) const; | 40 ScriptValue details(ScriptState*, ExceptionState&) const; |
| 40 PaymentAddress* shippingAddress() const { return m_shippingAddress.get(); } | 41 PaymentAddress* shippingAddress() const { return m_shippingAddress.get(); } |
| 41 const String& shippingOption() const { return m_shippingOption; } | 42 const String& shippingOption() const { return m_shippingOption; } |
| 42 const String& payerName() const { return m_payerName; } | 43 const String& payerName() const { return m_payerName; } |
| 43 const String& payerEmail() const { return m_payerEmail; } | 44 const String& payerEmail() const { return m_payerEmail; } |
| 44 const String& payerPhone() const { return m_payerPhone; } | 45 const String& payerPhone() const { return m_payerPhone; } |
| 45 | 46 |
| 46 ScriptPromise complete(ScriptState*, const String& result = ""); | 47 ScriptPromise complete(ScriptState*, const String& result = ""); |
| 47 | 48 |
| 48 DECLARE_TRACE(); | 49 DECLARE_TRACE(); |
| 49 | 50 |
| 50 private: | 51 private: |
| 52 String m_requestId; | |
| 51 String m_methodName; | 53 String m_methodName; |
| 52 String m_stringifiedDetails; | 54 String m_stringifiedDetails; |
| 53 Member<PaymentAddress> m_shippingAddress; | 55 Member<PaymentAddress> m_shippingAddress; |
| 54 String m_shippingOption; | 56 String m_shippingOption; |
| 55 String m_payerName; | 57 String m_payerName; |
| 56 String m_payerEmail; | 58 String m_payerEmail; |
| 57 String m_payerPhone; | 59 String m_payerPhone; |
| 58 Member<PaymentCompleter> m_paymentCompleter; | 60 Member<PaymentCompleter> m_paymentCompleter; |
| 59 }; | 61 }; |
| 60 | 62 |
| 61 } // namespace blink | 63 } // namespace blink |
| 62 | 64 |
| 63 #endif // PaymentResponse_h | 65 #endif // PaymentResponse_h |
| OLD | NEW |