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

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

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

Powered by Google App Engine
This is Rietveld 408576698