| 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 76e7ff746ae8baaf19628b9069fff2bfb9b58329..7836ae99fea9c31c8be305e2cb7004330674db3b 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(ServiceWorkerHostMsg_WorkerStarted,
|
| + OnWorkerStarted)
|
| + IPC_MESSAGE_HANDLER(ServiceWorkerHostMsg_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,
|
|
|