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

Unified Diff: third_party/WebKit/Source/modules/payments/PaymentRequestEvent.cpp

Issue 2903643002: PaymentHandler: Implement PaymentRequestEvent constructor. (Closed)
Patch Set: constructor Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/payments/PaymentRequestEvent.cpp
diff --git a/third_party/WebKit/Source/modules/payments/PaymentRequestEvent.cpp b/third_party/WebKit/Source/modules/payments/PaymentRequestEvent.cpp
index ad2a0d2bc7d1fb69cbc9039151ea62a1d6ac1e18..746a345107a7be2440129e01f3b59cc08fa1b23d 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentRequestEvent.cpp
+++ b/third_party/WebKit/Source/modules/payments/PaymentRequestEvent.cpp
@@ -18,6 +18,12 @@ namespace blink {
PaymentRequestEvent* PaymentRequestEvent::Create(
const AtomicString& type,
+ const PaymentRequestEventInit& initializer) {
+ return new PaymentRequestEvent(type, initializer);
+}
+
+PaymentRequestEvent* PaymentRequestEvent::Create(
+ const AtomicString& type,
const PaymentRequestEventInit& initializer,
RespondWithObserver* respond_with_observer,
WaitUntilObserver* wait_until_observer) {
@@ -119,6 +125,18 @@ DEFINE_TRACE(PaymentRequestEvent) {
PaymentRequestEvent::PaymentRequestEvent(
const AtomicString& type,
+ const PaymentRequestEventInit& initializer)
+ : ExtendableEvent(type, initializer),
+ top_level_origin_(initializer.topLevelOrigin()),
+ payment_request_origin_(initializer.paymentRequestOrigin()),
+ payment_request_id_(initializer.paymentRequestId()),
+ method_data_(std::move(initializer.methodData())),
+ total_(initializer.total()),
+ modifiers_(initializer.modifiers()),
+ instrument_key_(initializer.instrumentKey()) {}
+
+PaymentRequestEvent::PaymentRequestEvent(
+ const AtomicString& type,
const PaymentRequestEventInit& initializer,
RespondWithObserver* respond_with_observer,
WaitUntilObserver* wait_until_observer)

Powered by Google App Engine
This is Rietveld 408576698