Index: content/browser/service_worker/service_worker_dispatcher_host.cc |
diff --git a/content/browser/service_worker/service_worker_dispatcher_host.cc b/content/browser/service_worker/service_worker_dispatcher_host.cc |
index 92fe5e761fe4d6ef2be0f18fdfc5ebf24a9fb5ad..0ae3c821c7f0c6af95fcbb0be5423d10ed2eda21 100644 |
--- a/content/browser/service_worker/service_worker_dispatcher_host.cc |
+++ b/content/browser/service_worker/service_worker_dispatcher_host.cc |
@@ -61,9 +61,6 @@ void ServiceWorkerDispatcherHost::OnDestruct() const { |
bool ServiceWorkerDispatcherHost::OnMessageReceived( |
const IPC::Message& message, |
bool* message_was_ok) { |
- if (IPC_MESSAGE_CLASS(message) != ServiceWorkerMsgStart) |
- return false; |
- |
bool handled = true; |
IPC_BEGIN_MESSAGE_MAP_EX( |
ServiceWorkerDispatcherHost, message, *message_was_ok) |
@@ -75,6 +72,10 @@ bool ServiceWorkerDispatcherHost::OnMessageReceived( |
OnProviderCreated) |
IPC_MESSAGE_HANDLER(ServiceWorkerHostMsg_ProviderDestroyed, |
OnProviderDestroyed) |
+ IPC_MESSAGE_HANDLER(EmbeddedWorkerHostMsg_WorkerStarted, |
+ OnWorkerStarted) |
+ IPC_MESSAGE_HANDLER(EmbeddedWorkerHostMsg_WorkerStopped, |
+ OnWorkerStopped) |
IPC_MESSAGE_UNHANDLED(handled = false) |
IPC_END_MESSAGE_MAP() |
@@ -176,6 +177,21 @@ void ServiceWorkerDispatcherHost::RegistrationComplete( |
thread_id, request_id, registration_id)); |
} |
+void ServiceWorkerDispatcherHost::OnWorkerStarted( |
+ int thread_id, int embedded_worker_id) { |
+ if (!context_) |
+ return; |
+ context_->embedded_worker_registry()->OnWorkerStarted( |
+ render_process_id_, thread_id, embedded_worker_id); |
+} |
+ |
+void ServiceWorkerDispatcherHost::OnWorkerStopped(int embedded_worker_id) { |
+ if (!context_) |
+ return; |
+ context_->embedded_worker_registry()->OnWorkerStopped( |
+ render_process_id_, embedded_worker_id); |
+} |
+ |
void ServiceWorkerDispatcherHost::UnregistrationComplete( |
int32 thread_id, |
int32 request_id, |