summaryrefslogtreecommitdiffstats
path: root/content/common/service_worker
diff options
context:
space:
mode:
authorkinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-08 23:48:10 +0000
committerkinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-08 23:48:10 +0000
commit8f804a1da8994c447c8e7987eb5e974c8ef71c90 (patch)
tree82c3b6f8f30d92204dfed67510e9cba1a6c6d9d9 /content/common/service_worker
parent14968c3de5f51a06fb9a009c8b2943a3b6259c40 (diff)
downloadchromium_src-8f804a1da8994c447c8e7987eb5e974c8ef71c90.zip
chromium_src-8f804a1da8994c447c8e7987eb5e974c8ef71c90.tar.gz
chromium_src-8f804a1da8994c447c8e7987eb5e974c8ef71c90.tar.bz2
Populate .current right after navigator.serviceWorker is accessed
- Remove AddScriptClient/RemoveScriptClient messsaging - SetCurrent, StateChanged messages are always sent to the document thread - Changed ObjectDestroyed message to {Increment,Decrement}RefCount - Multiple providers for the same document could share one SWProviderContext (new class) - SWProviderContext is: -- responsible for keeping refcount for .current etc (while no script provider's available -- responsible for updating .current info for newer provider initialization -- responsible for forwarding .current related messages to worker providers --> DROPPED BUG=366538 TEST=to be added later (https://codereview.chromium.org/265943003/) R=falken@chromium.org, jochen@chromium.org, michaeln@chromium.org, tsepez@chromium.org Review URL: https://codereview.chromium.org/261533003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@269102 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/common/service_worker')
-rw-r--r--content/common/service_worker/service_worker_messages.h18
1 files changed, 6 insertions, 12 deletions
diff --git a/content/common/service_worker/service_worker_messages.h b/content/common/service_worker/service_worker_messages.h
index 8af1825..5337c6b 100644
--- a/content/common/service_worker/service_worker_messages.h
+++ b/content/common/service_worker/service_worker_messages.h
@@ -81,8 +81,12 @@ IPC_MESSAGE_CONTROL1(ServiceWorkerHostMsg_ProviderCreated,
IPC_MESSAGE_CONTROL1(ServiceWorkerHostMsg_ProviderDestroyed,
int /* provider_id */)
-// Informs the browser of a ServiceWorker object being destroyed.
-IPC_MESSAGE_CONTROL1(ServiceWorkerHostMsg_ServiceWorkerObjectDestroyed,
+// Increments and decrements the ServiceWorker object's reference
+// counting in the browser side. The ServiceWorker object is created
+// with ref-count==1 initially.
+IPC_MESSAGE_CONTROL1(ServiceWorkerHostMsg_IncrementServiceWorkerRefCount,
+ int /* handle_id */)
+IPC_MESSAGE_CONTROL1(ServiceWorkerHostMsg_DecrementServiceWorkerRefCount,
int /* handle_id */)
// Informs the browser that |provider_id| is associated
@@ -92,16 +96,6 @@ IPC_MESSAGE_CONTROL2(ServiceWorkerHostMsg_SetVersionId,
int /* provider_id */,
int64 /* version_id */)
-// Informs the browser of a new scriptable API client in the child process.
-IPC_MESSAGE_CONTROL2(ServiceWorkerHostMsg_AddScriptClient,
- int /* thread_id */,
- int /* provider_id */)
-
-// Informs the browser that the scriptable API client is unregistered.
-IPC_MESSAGE_CONTROL2(ServiceWorkerHostMsg_RemoveScriptClient,
- int /* thread_id */,
- int /* provider_id */)
-
// Informs the browser that event handling has finished.
// Routed to the target ServiceWorkerVersion.
IPC_MESSAGE_ROUTED2(ServiceWorkerHostMsg_InstallEventFinished,