Per OnionSoup project, we are going to move WebWorkerFetchContextImpl
into blink, which blocks the Onion Soup tasks for workers.
This patch makes the changes:
- Adds a new interface WebDedicatedAndSharedWorkerFetchContext that
inherits the WebWorkerFetchContext used to exposes the necessary methods
to //content.
- Adds the following methods into platform API:
- CreateURLLoaderThrottleProviderForWorker()
- CreateWebSocketHandshakeThrottleProvider()
- OriginCanAccessServiceWorkers()
- CreateServiceWorkerSubresourceLoaderFactory()
- CloneServiceWorkerContainerHost() used to clone a
ServiceWorkerContainerHost.
- Finally, moves the WebWorkerFetchContextImpl to
blink/renderer/platform/loader/fetch/url_loader/ and renames to
DedicatedOrSharedWorkerFetchContextImpl that implements
WebDedicatedAndSharedWorkerFetchContext.
The class hierarchy before this patch looks like:
+---------------------------+
| blink::WorkerFetchContext |
+-----^-----------------^---+
| |
| |
| |
| |
+----------------------------+-----+ |
|content::WebWorkerFetchContextImpl| |
+----------------------------------+ |
|
+------------------------------+------+
| blink::WebServiceWorkerFetchContext|
+-------------------------------------+
and after this patch:
+-----------------------------------+
|blink::WebServiceWorkerFetchContext+----+
+-----------------------------------+ |
|
|
|
+----------------------------+ |
|blink::WebWorkerFetchContext<--------+
+------------^---------------+
|
+---------------------+------------------------+
|blink::WebDedicatedAndSharedWorkerFetchContext|
+---------------------^------------------------+
|
+---------------------+-------------------------+
| blink::DedicatedOrSharedWorkerFetchContextImpl|
+-----------------------------------------------+
Change-Id: I35e3eada352a1510b2fd9764a58e4e01177fee32
Bug: 1110176
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2755169
Commit-Queue: Minggang Wang <minggang.wang@intel.com>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#885013}