Chromium Code Reviews| 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)) |
|
zino
2017/05/25 17:02:42
If the origin of the url is not the same as the SW
gogerald1
2017/05/29 22:13:16
Done.
|
| + ->clients() |
| + ->openWindow(script_state, top_level_origin_, url); |
| +} |
| + |
| void PaymentRequestEvent::respondWith(ScriptState* script_state, |
| ScriptPromise script_promise, |
| ExceptionState& exception_state) { |