| Index: content/common/worker_fetch_context_factory.mojom
|
| diff --git a/content/common/worker_fetch_context_factory.mojom b/content/common/worker_fetch_context_factory.mojom
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..3e3c6d75fef52dc8bb37e83b3bc21124e1b4ae8e
|
| --- /dev/null
|
| +++ b/content/common/worker_fetch_context_factory.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 ServiceWorkerClient {
|
| + // Called when the ServiceWorkerClient (which is Dedicated Worker or Shared
|
| + // Worker) is controlled by a new service worker.
|
| + SetControllerServiceWorker(int64 controller_version_id);
|
| +};
|
| +
|
| +interface WorkerFetchContextFactory {
|
| + // Called from a dedicated (or shared) worker thread to create a worker fetch
|
| + // context.
|
| + // The browser process returns a URLLoaderFactory. SetControllerServiceWorker
|
| + // method of the passed ServiceWorkerClient 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 ServiceWorkerClient client,
|
| + int32 service_worker_provider_id);
|
| +
|
| + // Called from the service worker thread to get the URLLoaderFactory.
|
| + GetURLLoaderFactory(associated URLLoaderFactory& loader);
|
| +};
|
|
|