| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/child/service_worker/service_worker_message_filter.h" | 5 #include "content/child/service_worker/service_worker_message_filter.h" |
| 6 | 6 |
| 7 #include "base/message_loop/message_loop_proxy.h" | 7 #include "base/message_loop/message_loop_proxy.h" |
| 8 #include "content/child/service_worker/service_worker_dispatcher.h" | 8 #include "content/child/service_worker/service_worker_dispatcher.h" |
| 9 #include "content/child/thread_safe_sender.h" | 9 #include "content/child/thread_safe_sender.h" |
| 10 #include "content/child/worker_thread_task_runner.h" | 10 #include "content/child/worker_thread_task_runner.h" |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 OnStaleSetVersionAttributes) | 75 OnStaleSetVersionAttributes) |
| 76 IPC_MESSAGE_HANDLER(ServiceWorkerMsg_SetControllerServiceWorker, | 76 IPC_MESSAGE_HANDLER(ServiceWorkerMsg_SetControllerServiceWorker, |
| 77 OnStaleSetControllerServiceWorker) | 77 OnStaleSetControllerServiceWorker) |
| 78 IPC_END_MESSAGE_MAP() | 78 IPC_END_MESSAGE_MAP() |
| 79 } | 79 } |
| 80 | 80 |
| 81 void ServiceWorkerMessageFilter::OnStaleRegistered( | 81 void ServiceWorkerMessageFilter::OnStaleRegistered( |
| 82 int thread_id, | 82 int thread_id, |
| 83 int request_id, | 83 int request_id, |
| 84 const ServiceWorkerRegistrationObjectInfo& info) { | 84 const ServiceWorkerRegistrationObjectInfo& info) { |
| 85 SendRegistrationObjectDestroyed(thread_safe_sender_, info.handle_id); | 85 SendRegistrationObjectDestroyed(thread_safe_sender_.get(), info.handle_id); |
| 86 } | 86 } |
| 87 | 87 |
| 88 void ServiceWorkerMessageFilter::OnStaleSetVersionAttributes( | 88 void ServiceWorkerMessageFilter::OnStaleSetVersionAttributes( |
| 89 int thread_id, | 89 int thread_id, |
| 90 int provider_id, | 90 int provider_id, |
| 91 int registration_handle_id, | 91 int registration_handle_id, |
| 92 int changed_mask, | 92 int changed_mask, |
| 93 const ServiceWorkerVersionAttributes& attributes) { | 93 const ServiceWorkerVersionAttributes& attributes) { |
| 94 SendServiceWorkerObjectDestroyed(thread_safe_sender_, | 94 SendServiceWorkerObjectDestroyed(thread_safe_sender_.get(), |
| 95 attributes.installing.handle_id); | 95 attributes.installing.handle_id); |
| 96 SendServiceWorkerObjectDestroyed(thread_safe_sender_, | 96 SendServiceWorkerObjectDestroyed(thread_safe_sender_.get(), |
| 97 attributes.waiting.handle_id); | 97 attributes.waiting.handle_id); |
| 98 SendServiceWorkerObjectDestroyed(thread_safe_sender_, | 98 SendServiceWorkerObjectDestroyed(thread_safe_sender_.get(), |
| 99 attributes.active.handle_id); | 99 attributes.active.handle_id); |
| 100 SendRegistrationObjectDestroyed(thread_safe_sender_, registration_handle_id); | 100 SendRegistrationObjectDestroyed(thread_safe_sender_.get(), |
| 101 registration_handle_id); |
| 101 } | 102 } |
| 102 | 103 |
| 103 void ServiceWorkerMessageFilter::OnStaleSetControllerServiceWorker( | 104 void ServiceWorkerMessageFilter::OnStaleSetControllerServiceWorker( |
| 104 int thread_id, | 105 int thread_id, |
| 105 int provider_id, | 106 int provider_id, |
| 106 const ServiceWorkerObjectInfo& info) { | 107 const ServiceWorkerObjectInfo& info) { |
| 107 SendServiceWorkerObjectDestroyed(thread_safe_sender_, info.handle_id); | 108 SendServiceWorkerObjectDestroyed(thread_safe_sender_.get(), info.handle_id); |
| 108 } | 109 } |
| 109 | 110 |
| 110 } // namespace content | 111 } // namespace content |
| OLD | NEW |