Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(94)

Unified Diff: content/child/service_worker/service_worker_message_filter.cc

Issue 445883003: ServiceWorker: Consolidate version change messages (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/child/service_worker/service_worker_message_filter.cc
diff --git a/content/child/service_worker/service_worker_message_filter.cc b/content/child/service_worker/service_worker_message_filter.cc
index 2b95d8545bd604751a1db927adc4e91a45f65acd..14dc6d758c451277c1fe38e1eebd17dc190496a1 100644
--- a/content/child/service_worker/service_worker_message_filter.cc
+++ b/content/child/service_worker/service_worker_message_filter.cc
@@ -9,6 +9,7 @@
#include "content/child/thread_safe_sender.h"
#include "content/child/worker_thread_task_runner.h"
#include "content/common/service_worker/service_worker_messages.h"
+#include "content/common/service_worker/service_worker_types.h"
#include "ipc/ipc_message_macros.h"
namespace content {
@@ -61,10 +62,10 @@ void ServiceWorkerMessageFilter::OnStaleMessageReceived(
IPC_BEGIN_MESSAGE_MAP(ServiceWorkerMessageFilter, msg)
IPC_MESSAGE_HANDLER(ServiceWorkerMsg_ServiceWorkerRegistered,
OnStaleRegistered)
- IPC_MESSAGE_HANDLER(ServiceWorkerMsg_SetWaitingServiceWorker,
- OnStaleSetServiceWorker)
+ IPC_MESSAGE_HANDLER(ServiceWorkerMsg_SetVersionAttributes,
+ OnStaleSetVersionAttributes)
IPC_MESSAGE_HANDLER(ServiceWorkerMsg_SetControllerServiceWorker,
- OnStaleSetServiceWorker)
+ OnStaleSetControllerServiceWorker)
IPC_END_MESSAGE_MAP()
}
@@ -75,7 +76,20 @@ void ServiceWorkerMessageFilter::OnStaleRegistered(
SendServiceWorkerObjectDestroyed(thread_safe_sender_, info.handle_id);
}
-void ServiceWorkerMessageFilter::OnStaleSetServiceWorker(
+void ServiceWorkerMessageFilter::OnStaleSetVersionAttributes(
+ int thread_id,
+ int provider_id,
+ int changed_mask,
+ const ServiceWorkerVersionAttributes& attributes) {
+ SendServiceWorkerObjectDestroyed(thread_safe_sender_,
+ attributes.installing.handle_id);
+ SendServiceWorkerObjectDestroyed(thread_safe_sender_,
+ attributes.waiting.handle_id);
+ SendServiceWorkerObjectDestroyed(thread_safe_sender_,
+ attributes.active.handle_id);
+}
+
+void ServiceWorkerMessageFilter::OnStaleSetControllerServiceWorker(
int thread_id,
int provider_id,
const ServiceWorkerObjectInfo& info) {
« no previous file with comments | « content/child/service_worker/service_worker_message_filter.h ('k') | content/common/service_worker/service_worker_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698