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

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

Issue 2705293010: PaymentApp: Implement respondWith() in PaymentRequestEvent. (blink side) (Closed)
Patch Set: PaymentApp: Implement respondWith() in PaymentRequestEvent. (blink side) Created 3 years, 9 months 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 PaymentRequestEvent_h 5 #ifndef PaymentRequestEvent_h
6 #define PaymentRequestEvent_h 6 #define PaymentRequestEvent_h
7 7
8 #include "modules/EventModules.h" 8 #include "modules/EventModules.h"
9 #include "modules/payments/PaymentAppRequest.h" 9 #include "modules/payments/PaymentAppRequest.h"
10 #include "modules/serviceworkers/ExtendableEvent.h" 10 #include "modules/serviceworkers/ExtendableEvent.h"
11 #include "platform/heap/Handle.h" 11 #include "platform/heap/Handle.h"
12 12
13 namespace WTF { 13 namespace WTF {
14 class AtomicString; 14 class AtomicString;
15 } 15 }
16 16
17 namespace blink { 17 namespace blink {
18 18
19 class RespondWithObserver;
20
19 class MODULES_EXPORT PaymentRequestEvent final : public ExtendableEvent { 21 class MODULES_EXPORT PaymentRequestEvent final : public ExtendableEvent {
20 DEFINE_WRAPPERTYPEINFO(); 22 DEFINE_WRAPPERTYPEINFO();
21 WTF_MAKE_NONCOPYABLE(PaymentRequestEvent); 23 WTF_MAKE_NONCOPYABLE(PaymentRequestEvent);
22 24
23 public: 25 public:
24 static PaymentRequestEvent* create(const AtomicString& type, 26 static PaymentRequestEvent* create(const AtomicString& type,
25 const PaymentAppRequest&, 27 const PaymentAppRequest&,
28 RespondWithObserver*,
26 WaitUntilObserver*); 29 WaitUntilObserver*);
27 ~PaymentRequestEvent() override; 30 ~PaymentRequestEvent() override;
28 31
29 const AtomicString& interfaceName() const override; 32 const AtomicString& interfaceName() const override;
30 33
31 void appRequest(PaymentAppRequest&) const; 34 void appRequest(PaymentAppRequest&) const;
32 void respondWith(ScriptPromise); 35 void respondWith(ScriptState*, ScriptPromise, ExceptionState&);
33 36
34 DECLARE_VIRTUAL_TRACE(); 37 DECLARE_VIRTUAL_TRACE();
35 38
36 private: 39 private:
37 PaymentRequestEvent(const AtomicString& type, 40 PaymentRequestEvent(const AtomicString& type,
38 const PaymentAppRequest&, 41 const PaymentAppRequest&,
42 RespondWithObserver*,
39 WaitUntilObserver*); 43 WaitUntilObserver*);
40 PaymentAppRequest m_appRequest; 44 PaymentAppRequest m_appRequest;
45 Member<RespondWithObserver> m_observer;
41 }; 46 };
42 47
43 } // namespace blink 48 } // namespace blink
44 49
45 #endif // PaymentRequestEvent_h 50 #endif // PaymentRequestEvent_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698