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

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

Issue 2477883002: [Web Payments] Mojom namespace blink -> payments (Closed)
Patch Set: Fix WebKit tests Created 4 years, 1 month 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 17 matching lines...) Expand all
28 28
29 namespace blink { 29 namespace blink {
30 30
31 class ExceptionState; 31 class ExceptionState;
32 class PaymentAddress; 32 class PaymentAddress;
33 class ScriptPromiseResolver; 33 class ScriptPromiseResolver;
34 class ScriptState; 34 class ScriptState;
35 35
36 class MODULES_EXPORT PaymentRequest final 36 class MODULES_EXPORT PaymentRequest final
37 : public EventTargetWithInlineData, 37 : public EventTargetWithInlineData,
38 WTF_NON_EXPORTED_BASE(public mojom::blink::PaymentRequestClient), 38 WTF_NON_EXPORTED_BASE(
39 public payments::mojom::blink::PaymentRequestClient),
39 public PaymentCompleter, 40 public PaymentCompleter,
40 public PaymentUpdater, 41 public PaymentUpdater,
41 public ContextLifecycleObserver, 42 public ContextLifecycleObserver,
42 public ActiveScriptWrappable { 43 public ActiveScriptWrappable {
43 DEFINE_WRAPPERTYPEINFO(); 44 DEFINE_WRAPPERTYPEINFO();
44 USING_GARBAGE_COLLECTED_MIXIN(PaymentRequest) 45 USING_GARBAGE_COLLECTED_MIXIN(PaymentRequest)
45 WTF_MAKE_NONCOPYABLE(PaymentRequest); 46 WTF_MAKE_NONCOPYABLE(PaymentRequest);
46 47
47 public: 48 public:
48 static PaymentRequest* create(ScriptState*, 49 static PaymentRequest* create(ScriptState*,
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 private: 96 private:
96 PaymentRequest(ScriptState*, 97 PaymentRequest(ScriptState*,
97 const HeapVector<PaymentMethodData>&, 98 const HeapVector<PaymentMethodData>&,
98 const PaymentDetails&, 99 const PaymentDetails&,
99 const PaymentOptions&, 100 const PaymentOptions&,
100 ExceptionState&); 101 ExceptionState&);
101 102
102 // LifecycleObserver: 103 // LifecycleObserver:
103 void contextDestroyed() override; 104 void contextDestroyed() override;
104 105
105 // mojom::blink::PaymentRequestClient: 106 // payments::mojom::blink::PaymentRequestClient:
106 void OnShippingAddressChange(mojom::blink::PaymentAddressPtr) override; 107 void OnShippingAddressChange(
108 payments::mojom::blink::PaymentAddressPtr) override;
107 void OnShippingOptionChange(const String& shippingOptionId) override; 109 void OnShippingOptionChange(const String& shippingOptionId) override;
108 void OnPaymentResponse(mojom::blink::PaymentResponsePtr) override; 110 void OnPaymentResponse(payments::mojom::blink::PaymentResponsePtr) override;
109 void OnError(mojom::blink::PaymentErrorReason) override; 111 void OnError(payments::mojom::blink::PaymentErrorReason) override;
110 void OnComplete() override; 112 void OnComplete() override;
111 void OnAbort(bool abortedSuccessfully) override; 113 void OnAbort(bool abortedSuccessfully) override;
112 114
113 void onCompleteTimeout(TimerBase*); 115 void onCompleteTimeout(TimerBase*);
114 116
115 // Clears the promise resolvers and closes the Mojo connection. 117 // Clears the promise resolvers and closes the Mojo connection.
116 void clearResolversAndCloseMojoConnection(); 118 void clearResolversAndCloseMojoConnection();
117 119
118 PaymentOptions m_options; 120 PaymentOptions m_options;
119 Member<PaymentAddress> m_shippingAddress; 121 Member<PaymentAddress> m_shippingAddress;
120 String m_shippingOption; 122 String m_shippingOption;
121 String m_shippingType; 123 String m_shippingType;
122 Member<ScriptPromiseResolver> m_showResolver; 124 Member<ScriptPromiseResolver> m_showResolver;
123 Member<ScriptPromiseResolver> m_completeResolver; 125 Member<ScriptPromiseResolver> m_completeResolver;
124 Member<ScriptPromiseResolver> m_abortResolver; 126 Member<ScriptPromiseResolver> m_abortResolver;
125 mojom::blink::PaymentRequestPtr m_paymentProvider; 127 payments::mojom::blink::PaymentRequestPtr m_paymentProvider;
126 mojo::Binding<mojom::blink::PaymentRequestClient> m_clientBinding; 128 mojo::Binding<payments::mojom::blink::PaymentRequestClient> m_clientBinding;
127 Timer<PaymentRequest> m_completeTimer; 129 Timer<PaymentRequest> m_completeTimer;
128 }; 130 };
129 131
130 } // namespace blink 132 } // namespace blink
131 133
132 #endif // PaymentRequest_h 134 #endif // PaymentRequest_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698