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..75596a865ff9767aa1de3d7297bf891f29a957e4 100644 |
--- a/content/browser/service_worker/service_worker_version.cc |
+++ b/content/browser/service_worker/service_worker_version.cc |
@@ -927,8 +927,8 @@ 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_OpenNewTab, OnOpenNewTab) |
+ IPC_MESSAGE_HANDLER(ServiceWorkerHostMsg_OpenNewPopup, OnOpenNewPopup) |
IPC_MESSAGE_HANDLER(ServiceWorkerHostMsg_SetCachedMetadata, |
OnSetCachedMetadata) |
IPC_MESSAGE_HANDLER(ServiceWorkerHostMsg_ClearCachedMetadata, |
@@ -1045,7 +1045,17 @@ void ServiceWorkerVersion::CountFeature(uint32_t feature) { |
provider_host_by_uuid.second->CountFeature(feature); |
} |
-void ServiceWorkerVersion::OnOpenWindow(int request_id, GURL url) { |
+void ServiceWorkerVersion::OnOpenNewTab(int request_id, const GURL& url) { |
+ OnOpenWindow(request_id, url, WindowOpenDisposition::NEW_FOREGROUND_TAB); |
+} |
+ |
+void ServiceWorkerVersion::OnOpenNewPopup(int request_id, const 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 +1086,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)); |
} |