Chromium Code Reviews| Index: content/common/worker_url_loader_factory_provider.mojom |
| diff --git a/content/common/worker_url_loader_factory_provider.mojom b/content/common/worker_url_loader_factory_provider.mojom |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..29106da033cab3688251c3dfb71644a8aa794f3f |
| --- /dev/null |
| +++ b/content/common/worker_url_loader_factory_provider.mojom |
| @@ -0,0 +1,29 @@ |
| +// Copyright 2017 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +module content.mojom; |
| + |
| +import "url_loader_factory.mojom"; |
| + |
| +interface ServiceWorkerWorkerClient { |
|
kinuko
2017/04/18 08:00:31
can we also have an interface-level comment for th
horo
2017/04/18 12:53:34
Done.
|
| + // Called when the ServiceWorkerWorkerClient (which is a dedicated worker or |
| + // a shared worker) is controlled by a new service worker. |
| + SetControllerServiceWorker(int64 controller_version_id); |
| +}; |
| + |
| +// An interface which provides URLLoaderFactory for worker context. |
|
kinuko
2017/04/18 08:00:31
nit: can you make it clear about the IPC direction
horo
2017/04/18 12:53:34
Done.
|
| +interface WorkerURLLoaderFactoryProvider { |
| + // Called from a dedicated (or shared) worker thread to create a worker fetch |
| + // context. The browser process returns a URLLoaderFactory for the worker. |
| + // SetControllerServiceWorker method of the passed ServiceWorkerWorkerClient |
| + // interface will be called when the parent frame and the worker context is |
| + // controlled by a service worker. |service_worker_provider_id| is the service |
| + // worker provider id of the parent frame. |
| + CreateWorkerFetchContext(associated URLLoaderFactory& loader, |
| + associated ServiceWorkerWorkerClient client, |
| + int32 service_worker_provider_id); |
| + |
| + // Called from the service worker thread to get the URLLoaderFactory. |
| + GetURLLoaderFactory(associated URLLoaderFactory& loader); |
| +}; |