Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(185)

Side by Side Diff: third_party/WebKit/Source/modules/payments/PaymentRequest.h

Issue 2552693002: [Merge M-56] Rename canMakeActivePayment to canMakePayment (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 ScriptPromise show(ScriptState*); 61 ScriptPromise show(ScriptState*);
62 ScriptPromise abort(ScriptState*); 62 ScriptPromise abort(ScriptState*);
63 63
64 PaymentAddress* getShippingAddress() const { return m_shippingAddress.get(); } 64 PaymentAddress* getShippingAddress() const { return m_shippingAddress.get(); }
65 const String& shippingOption() const { return m_shippingOption; } 65 const String& shippingOption() const { return m_shippingOption; }
66 const String& shippingType() const { return m_shippingType; } 66 const String& shippingType() const { return m_shippingType; }
67 67
68 DEFINE_ATTRIBUTE_EVENT_LISTENER(shippingaddresschange); 68 DEFINE_ATTRIBUTE_EVENT_LISTENER(shippingaddresschange);
69 DEFINE_ATTRIBUTE_EVENT_LISTENER(shippingoptionchange); 69 DEFINE_ATTRIBUTE_EVENT_LISTENER(shippingoptionchange);
70 70
71 ScriptPromise canMakeActivePayment(ScriptState*); 71 ScriptPromise canMakePayment(ScriptState*);
72 72
73 // ScriptWrappable: 73 // ScriptWrappable:
74 bool hasPendingActivity() const override; 74 bool hasPendingActivity() const override;
75 75
76 // EventTargetWithInlineData: 76 // EventTargetWithInlineData:
77 const AtomicString& interfaceName() const override; 77 const AtomicString& interfaceName() const override;
78 ExecutionContext* getExecutionContext() const override; 78 ExecutionContext* getExecutionContext() const override;
79 79
80 // PaymentCompleter: 80 // PaymentCompleter:
81 ScriptPromise complete(ScriptState*, PaymentComplete result) override; 81 ScriptPromise complete(ScriptState*, PaymentComplete result) override;
(...skipping 17 matching lines...) Expand all
99 void contextDestroyed() override; 99 void contextDestroyed() override;
100 100
101 // payments::mojom::blink::PaymentRequestClient: 101 // payments::mojom::blink::PaymentRequestClient:
102 void OnShippingAddressChange( 102 void OnShippingAddressChange(
103 payments::mojom::blink::PaymentAddressPtr) override; 103 payments::mojom::blink::PaymentAddressPtr) override;
104 void OnShippingOptionChange(const String& shippingOptionId) override; 104 void OnShippingOptionChange(const String& shippingOptionId) override;
105 void OnPaymentResponse(payments::mojom::blink::PaymentResponsePtr) override; 105 void OnPaymentResponse(payments::mojom::blink::PaymentResponsePtr) override;
106 void OnError(payments::mojom::blink::PaymentErrorReason) override; 106 void OnError(payments::mojom::blink::PaymentErrorReason) override;
107 void OnComplete() override; 107 void OnComplete() override;
108 void OnAbort(bool abortedSuccessfully) override; 108 void OnAbort(bool abortedSuccessfully) override;
109 void OnCanMakeActivePayment( 109 void OnCanMakePayment(
110 payments::mojom::blink::ActivePaymentQueryResult) override; 110 payments::mojom::blink::CanMakePaymentQueryResult) override;
111 111
112 void onCompleteTimeout(TimerBase*); 112 void onCompleteTimeout(TimerBase*);
113 113
114 // Clears the promise resolvers and closes the Mojo connection. 114 // Clears the promise resolvers and closes the Mojo connection.
115 void clearResolversAndCloseMojoConnection(); 115 void clearResolversAndCloseMojoConnection();
116 116
117 PaymentOptions m_options; 117 PaymentOptions m_options;
118 Member<PaymentAddress> m_shippingAddress; 118 Member<PaymentAddress> m_shippingAddress;
119 String m_shippingOption; 119 String m_shippingOption;
120 String m_shippingType; 120 String m_shippingType;
121 Member<ScriptPromiseResolver> m_showResolver; 121 Member<ScriptPromiseResolver> m_showResolver;
122 Member<ScriptPromiseResolver> m_completeResolver; 122 Member<ScriptPromiseResolver> m_completeResolver;
123 Member<ScriptPromiseResolver> m_abortResolver; 123 Member<ScriptPromiseResolver> m_abortResolver;
124 Member<ScriptPromiseResolver> m_canMakeActivePaymentResolver; 124 Member<ScriptPromiseResolver> m_canMakePaymentResolver;
125 payments::mojom::blink::PaymentRequestPtr m_paymentProvider; 125 payments::mojom::blink::PaymentRequestPtr m_paymentProvider;
126 mojo::Binding<payments::mojom::blink::PaymentRequestClient> m_clientBinding; 126 mojo::Binding<payments::mojom::blink::PaymentRequestClient> m_clientBinding;
127 Timer<PaymentRequest> m_completeTimer; 127 Timer<PaymentRequest> m_completeTimer;
128 }; 128 };
129 129
130 } // namespace blink 130 } // namespace blink
131 131
132 #endif // PaymentRequest_h 132 #endif // PaymentRequest_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698