OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 module content.mojom; | 5 module content.mojom; |
6 | 6 |
7 import "url_loader_factory.mojom"; | 7 import "content/public/common/url_loader_factory.mojom"; |
8 | 8 |
9 // A renderer-side interface that is returned by CreateWorkerFetchContext for | 9 // A renderer-side interface that is returned by CreateWorkerFetchContext for |
10 // the browser to notify the renderer process when there's a controller change. | 10 // the browser to notify the renderer process when there's a controller change. |
11 interface ServiceWorkerWorkerClient { | 11 interface ServiceWorkerWorkerClient { |
12 // Called when the ServiceWorkerWorkerClient (which is a dedicated worker or | 12 // Called when the ServiceWorkerWorkerClient (which is a dedicated worker or |
13 // a shared worker) is controlled by a new service worker. | 13 // a shared worker) is controlled by a new service worker. |
14 SetControllerServiceWorker(int64 controller_version_id); | 14 SetControllerServiceWorker(int64 controller_version_id); |
15 }; | 15 }; |
16 | 16 |
17 // A browser-side interface which provides URLLoaderFactory for worker contexts | 17 // A browser-side interface which provides URLLoaderFactory for worker contexts |
18 // in the renderer process. | 18 // in the renderer process. |
19 interface WorkerURLLoaderFactoryProvider { | 19 interface WorkerURLLoaderFactoryProvider { |
20 // Called from a dedicated (or shared) worker thread to get the | 20 // Called from a dedicated (or shared) worker thread to get the |
21 // URLLoaderFactory and register ServiceWorkerWorkerClient of the worker. | 21 // URLLoaderFactory and register ServiceWorkerWorkerClient of the worker. |
22 // SetControllerServiceWorker method of the passed ServiceWorkerWorkerClient | 22 // SetControllerServiceWorker method of the passed ServiceWorkerWorkerClient |
23 // interface will be called when the parent frame and the worker context is | 23 // interface will be called when the parent frame and the worker context is |
24 // controlled by a service worker. |service_worker_provider_id| is the service | 24 // controlled by a service worker. |service_worker_provider_id| is the service |
25 // worker provider id of the parent frame. | 25 // worker provider id of the parent frame. |
26 GetURLLoaderFactoryAndRegisterClient( | 26 GetURLLoaderFactoryAndRegisterClient( |
27 associated URLLoaderFactory& loader, | 27 associated URLLoaderFactory& loader, |
28 associated ServiceWorkerWorkerClient client, | 28 associated ServiceWorkerWorkerClient client, |
29 int32 service_worker_provider_id); | 29 int32 service_worker_provider_id); |
30 | 30 |
31 // Called from the service worker thread to get the URLLoaderFactory. | 31 // Called from the service worker thread to get the URLLoaderFactory. |
32 GetURLLoaderFactory(associated URLLoaderFactory& loader); | 32 GetURLLoaderFactory(associated URLLoaderFactory& loader); |
33 }; | 33 }; |
OLD | NEW |