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

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

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

Powered by Google App Engine
This is Rietveld 408576698