| Index: content/browser/service_worker/service_worker_version.cc
|
| diff --git a/content/browser/service_worker/service_worker_version.cc b/content/browser/service_worker/service_worker_version.cc
|
| index 59ece4dc11d2a0ed82e3d4228459c3b969649061..b70cbe7b070b24b17b27910e81c5916208ba6f86 100644
|
| --- a/content/browser/service_worker/service_worker_version.cc
|
| +++ b/content/browser/service_worker/service_worker_version.cc
|
| @@ -927,8 +927,10 @@ bool ServiceWorkerVersion::OnMessageReceived(const IPC::Message& message) {
|
| IPC_MESSAGE_HANDLER(ServiceWorkerHostMsg_GetClient, OnGetClient)
|
| IPC_MESSAGE_HANDLER(ServiceWorkerHostMsg_GetClients,
|
| OnGetClients)
|
| - IPC_MESSAGE_HANDLER(ServiceWorkerHostMsg_OpenWindow,
|
| - OnOpenWindow)
|
| + IPC_MESSAGE_HANDLER(ServiceWorkerHostMsg_OpenWindowForClients,
|
| + OnOpenWindowForClients)
|
| + IPC_MESSAGE_HANDLER(ServiceWorkerHostMsg_OpenWindowForPaymentHandler,
|
| + OnOpenWindowForPaymentHandler)
|
| IPC_MESSAGE_HANDLER(ServiceWorkerHostMsg_SetCachedMetadata,
|
| OnSetCachedMetadata)
|
| IPC_MESSAGE_HANDLER(ServiceWorkerHostMsg_ClearCachedMetadata,
|
| @@ -1045,7 +1047,18 @@ void ServiceWorkerVersion::CountFeature(uint32_t feature) {
|
| provider_host_by_uuid.second->CountFeature(feature);
|
| }
|
|
|
| -void ServiceWorkerVersion::OnOpenWindow(int request_id, GURL url) {
|
| +void ServiceWorkerVersion::OnOpenWindowForClients(int request_id, GURL url) {
|
| + OnOpenWindow(request_id, url, WindowOpenDisposition::NEW_FOREGROUND_TAB);
|
| +}
|
| +
|
| +void ServiceWorkerVersion::OnOpenWindowForPaymentHandler(int request_id,
|
| + GURL url) {
|
| + OnOpenWindow(request_id, url, WindowOpenDisposition::NEW_POPUP);
|
| +}
|
| +
|
| +void ServiceWorkerVersion::OnOpenWindow(int request_id,
|
| + GURL url,
|
| + WindowOpenDisposition disposition) {
|
| // Just abort if we are shutting down.
|
| if (!context_)
|
| return;
|
| @@ -1076,7 +1089,7 @@ void ServiceWorkerVersion::OnOpenWindow(int request_id, GURL url) {
|
| }
|
|
|
| service_worker_client_utils::OpenWindow(
|
| - url, script_url_, embedded_worker_->process_id(), context_,
|
| + url, script_url_, embedded_worker_->process_id(), context_, disposition,
|
| base::Bind(&ServiceWorkerVersion::OnOpenWindowFinished,
|
| weak_factory_.GetWeakPtr(), request_id));
|
| }
|
|
|