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

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

Issue 2893823004: [Payments] Implement openWindow for service worker based payment handler (Closed)
Patch Set: format 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 748de28bfa536339d42abb6323929f6bd6341052..99ae612217da0c64599bd579d8640bb64de1f5e9 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentRequestEvent.cpp
+++ b/third_party/WebKit/Source/modules/payments/PaymentRequestEvent.cpp
@@ -5,6 +5,8 @@
#include "modules/payments/PaymentRequestEvent.h"
#include "modules/serviceworkers/RespondWithObserver.h"
+#include "modules/serviceworkers/ServiceWorkerClients.h"
+#include "modules/serviceworkers/ServiceWorkerGlobalScope.h"
#include "platform/wtf/text/AtomicString.h"
namespace blink {
@@ -53,6 +55,13 @@ const String& PaymentRequestEvent::instrumentKey() const {
return instrument_key_;
}
+ScriptPromise PaymentRequestEvent::openWindow(ScriptState* script_state,
+ const String& url) {
+ return ToServiceWorkerGlobalScope(ExecutionContext::From(script_state))
+ ->clients()
+ ->openWindow(script_state, top_level_origin_, url);
+}
+
void PaymentRequestEvent::respondWith(ScriptState* script_state,
ScriptPromise script_promise,
ExceptionState& exception_state) {

Powered by Google App Engine
This is Rietveld 408576698