Commit cee84faa authored by Matt Falkenhagen's avatar Matt Falkenhagen Committed by Commit Bot

service worker: Tweak comment about ServiceWorkerWorkerClientRegistry.

Rely on mojom to document the individual functions, and move the
higher-level explanation to the class-level.

Bug: 31666
Change-Id: Ie493492db6616c7b967faf6a8d961c6f97dc9a10
Reviewed-on: https://chromium-review.googlesource.com/1113400Reviewed-by: default avatarKinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Matt Falkenhagen <falken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#570303}
parent 26659aaf
...@@ -47,6 +47,13 @@ struct ServiceWorkerProviderContextDeleter; ...@@ -47,6 +47,13 @@ struct ServiceWorkerProviderContextDeleter;
// the same underlying entity hold strong references to a shared instance of // the same underlying entity hold strong references to a shared instance of
// this class. // this class.
// //
// ServiceWorkerProviderContext is also a
// mojom::ServiceWorkerWorkerClientRegistry. If it's a provider for a document,
// then it tracks all the dedicated workers created from the document (including
// nested workers), as dedicated workers don't yet have their own providers. If
// it's a provider for a shared worker, then it tracks only the shared worker
// itself.
//
// Created and destructed on the main thread. Unless otherwise noted, all // Created and destructed on the main thread. Unless otherwise noted, all
// methods are called on the main thread. // methods are called on the main thread.
class CONTENT_EXPORT ServiceWorkerProviderContext class CONTENT_EXPORT ServiceWorkerProviderContext
...@@ -139,14 +146,8 @@ class CONTENT_EXPORT ServiceWorkerProviderContext ...@@ -139,14 +146,8 @@ class CONTENT_EXPORT ServiceWorkerProviderContext
base::WeakPtr<WebServiceWorkerProviderImpl> provider); base::WeakPtr<WebServiceWorkerProviderImpl> provider);
// mojom::ServiceWorkerWorkerClientRegistry: // mojom::ServiceWorkerWorkerClientRegistry:
// For service worker clients. ServiceWorkerProviderContext is also a
// mojom::ServiceWorkerWorkerHost (or Registry). If it's a provider for a
// document, then it tracks all the dedicated workers created from the
// document (including nested workers). If it's a provider for a shared
// worker, then it tracks only the shared worker itself.
void RegisterWorkerClient( void RegisterWorkerClient(
mojom::ServiceWorkerWorkerClientPtr client) override; mojom::ServiceWorkerWorkerClientPtr client) override;
// For cloning the worker host pointer.
void CloneWorkerClientRegistry( void CloneWorkerClientRegistry(
mojom::ServiceWorkerWorkerClientRegistryRequest request) override; mojom::ServiceWorkerWorkerClientRegistryRequest request) override;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment