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

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

Issue 2528683002: PaymentApp: Blink side of payment request event dispatching in service worker. (Closed)
Patch Set: PaymentApp: Blink side of payment request event dispatching in service worker. 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 #include "modules/payments/PaymentRequestEvent.h" 5 #include "modules/payments/PaymentRequestEvent.h"
6 6
7 #include "wtf/text/AtomicString.h" 7 #include "wtf/text/AtomicString.h"
8 8
9 namespace blink { 9 namespace blink {
10 10
11 PaymentRequestEvent* PaymentRequestEvent::create(
12 const AtomicString& type,
13 const PaymentAppRequestData& data,
14 WaitUntilObserver* observer) {
15 return new PaymentRequestEvent(type, data, observer);
16 }
17
11 PaymentRequestEvent::~PaymentRequestEvent() {} 18 PaymentRequestEvent::~PaymentRequestEvent() {}
12 19
13 const AtomicString& PaymentRequestEvent::interfaceName() const { 20 const AtomicString& PaymentRequestEvent::interfaceName() const {
14 return EventNames::PaymentRequestEvent; 21 return EventNames::PaymentRequestEvent;
15 } 22 }
16 23
17 void PaymentRequestEvent::data(PaymentAppRequestData& data) const { 24 void PaymentRequestEvent::data(PaymentAppRequestData& data) const {
haraken 2016/12/01 08:24:27 Why don't you return PaymentAppRequestData instead
zino 2016/12/02 03:13:49 Maybe, we can't return PaymentAppRequestData becau
18 NOTIMPLEMENTED(); 25 data = m_data;
19 } 26 }
20 27
21 void PaymentRequestEvent::respondWith(ScriptPromise) { 28 void PaymentRequestEvent::respondWith(ScriptPromise) {
22 NOTIMPLEMENTED(); 29 NOTIMPLEMENTED();
23 } 30 }
24 31
25 DEFINE_TRACE(PaymentRequestEvent) { 32 DEFINE_TRACE(PaymentRequestEvent) {
33 visitor->trace(m_data);
26 ExtendableEvent::trace(visitor); 34 ExtendableEvent::trace(visitor);
27 } 35 }
28 36
29 PaymentRequestEvent::PaymentRequestEvent(const AtomicString& type, 37 PaymentRequestEvent::PaymentRequestEvent(const AtomicString& type,
30 const PaymentAppRequestData& data, 38 const PaymentAppRequestData& data,
31 WaitUntilObserver* observer) 39 WaitUntilObserver* observer)
32 : ExtendableEvent(type, ExtendableEventInit(), observer) {} 40 : ExtendableEvent(type, ExtendableEventInit(), observer), m_data(data) {}
33 41
34 } // namespace blink 42 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698