OLD | NEW |
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( | 11 PaymentRequestEvent* PaymentRequestEvent::create( |
12 const AtomicString& type, | 12 const AtomicString& type, |
13 const PaymentAppRequestData& data, | 13 const PaymentAppRequest& appRequest, |
14 WaitUntilObserver* observer) { | 14 WaitUntilObserver* observer) { |
15 return new PaymentRequestEvent(type, data, observer); | 15 return new PaymentRequestEvent(type, appRequest, observer); |
16 } | 16 } |
17 | 17 |
18 PaymentRequestEvent::~PaymentRequestEvent() {} | 18 PaymentRequestEvent::~PaymentRequestEvent() {} |
19 | 19 |
20 const AtomicString& PaymentRequestEvent::interfaceName() const { | 20 const AtomicString& PaymentRequestEvent::interfaceName() const { |
21 return EventNames::PaymentRequestEvent; | 21 return EventNames::PaymentRequestEvent; |
22 } | 22 } |
23 | 23 |
24 void PaymentRequestEvent::data(PaymentAppRequestData& data) const { | 24 void PaymentRequestEvent::appRequest(PaymentAppRequest& appRequest) const { |
25 data = m_data; | 25 appRequest = m_appRequest; |
26 } | 26 } |
27 | 27 |
28 void PaymentRequestEvent::respondWith(ScriptPromise) { | 28 void PaymentRequestEvent::respondWith(ScriptPromise) { |
29 NOTIMPLEMENTED(); | 29 NOTIMPLEMENTED(); |
30 } | 30 } |
31 | 31 |
32 DEFINE_TRACE(PaymentRequestEvent) { | 32 DEFINE_TRACE(PaymentRequestEvent) { |
33 visitor->trace(m_data); | 33 visitor->trace(m_appRequest); |
34 ExtendableEvent::trace(visitor); | 34 ExtendableEvent::trace(visitor); |
35 } | 35 } |
36 | 36 |
37 PaymentRequestEvent::PaymentRequestEvent(const AtomicString& type, | 37 PaymentRequestEvent::PaymentRequestEvent(const AtomicString& type, |
38 const PaymentAppRequestData& data, | 38 const PaymentAppRequest& appRequest, |
39 WaitUntilObserver* observer) | 39 WaitUntilObserver* observer) |
40 : ExtendableEvent(type, ExtendableEventInit(), observer), m_data(data) {} | 40 : ExtendableEvent(type, ExtendableEventInit(), observer), |
| 41 m_appRequest(appRequest) {} |
41 | 42 |
42 } // namespace blink | 43 } // namespace blink |
OLD | NEW |