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 PaymentRequest_h | 5 #ifndef PaymentRequest_h |
6 #define PaymentRequest_h | 6 #define PaymentRequest_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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 : supportedMethods(methods), stringifiedData(data) {} | 49 : supportedMethods(methods), stringifiedData(data) {} |
50 Vector<String> supportedMethods; | 50 Vector<String> supportedMethods; |
51 String stringifiedData; | 51 String stringifiedData; |
52 }; | 52 }; |
53 | 53 |
54 ScriptPromise show(ScriptState*); | 54 ScriptPromise show(ScriptState*); |
55 ScriptPromise abort(ScriptState*); | 55 ScriptPromise abort(ScriptState*); |
56 | 56 |
57 PaymentAddress* getShippingAddress() const { return m_shippingAddress.get();
} | 57 PaymentAddress* getShippingAddress() const { return m_shippingAddress.get();
} |
58 const String& shippingOption() const { return m_shippingOption; } | 58 const String& shippingOption() const { return m_shippingOption; } |
| 59 const String& shippingType() const { return m_shippingType; } |
59 | 60 |
60 DEFINE_ATTRIBUTE_EVENT_LISTENER(shippingaddresschange); | 61 DEFINE_ATTRIBUTE_EVENT_LISTENER(shippingaddresschange); |
61 DEFINE_ATTRIBUTE_EVENT_LISTENER(shippingoptionchange); | 62 DEFINE_ATTRIBUTE_EVENT_LISTENER(shippingoptionchange); |
62 | 63 |
63 // ScriptWrappable: | 64 // ScriptWrappable: |
64 bool hasPendingActivity() const override; | 65 bool hasPendingActivity() const override; |
65 | 66 |
66 // EventTargetWithInlineData: | 67 // EventTargetWithInlineData: |
67 const AtomicString& interfaceName() const override; | 68 const AtomicString& interfaceName() const override; |
68 ExecutionContext* getExecutionContext() const override; | 69 ExecutionContext* getExecutionContext() const override; |
(...skipping 24 matching lines...) Expand all Loading... |
93 void OnAbort(bool abortedSuccessfully) override; | 94 void OnAbort(bool abortedSuccessfully) override; |
94 | 95 |
95 void onCompleteTimeout(TimerBase*); | 96 void onCompleteTimeout(TimerBase*); |
96 | 97 |
97 // Clears the promise resolvers and closes the Mojo connection. | 98 // Clears the promise resolvers and closes the Mojo connection. |
98 void clearResolversAndCloseMojoConnection(); | 99 void clearResolversAndCloseMojoConnection(); |
99 | 100 |
100 PaymentOptions m_options; | 101 PaymentOptions m_options; |
101 Member<PaymentAddress> m_shippingAddress; | 102 Member<PaymentAddress> m_shippingAddress; |
102 String m_shippingOption; | 103 String m_shippingOption; |
| 104 String m_shippingType; |
103 Member<ScriptPromiseResolver> m_showResolver; | 105 Member<ScriptPromiseResolver> m_showResolver; |
104 Member<ScriptPromiseResolver> m_completeResolver; | 106 Member<ScriptPromiseResolver> m_completeResolver; |
105 Member<ScriptPromiseResolver> m_abortResolver; | 107 Member<ScriptPromiseResolver> m_abortResolver; |
106 mojom::blink::PaymentRequestPtr m_paymentProvider; | 108 mojom::blink::PaymentRequestPtr m_paymentProvider; |
107 mojo::Binding<mojom::blink::PaymentRequestClient> m_clientBinding; | 109 mojo::Binding<mojom::blink::PaymentRequestClient> m_clientBinding; |
108 Timer<PaymentRequest> m_completeTimer; | 110 Timer<PaymentRequest> m_completeTimer; |
109 }; | 111 }; |
110 | 112 |
111 } // namespace blink | 113 } // namespace blink |
112 | 114 |
113 #endif // PaymentRequest_h | 115 #endif // PaymentRequest_h |
OLD | NEW |