| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "content/common/service_worker/service_worker_provider.mojom"; | 7 import "content/common/service_worker/service_worker_provider.mojom"; |
| 8 | 8 |
| 9 // Per-process browser-side interface. | 9 // Per-process browser-side interface. |
| 10 // The renderer uses this interface to tell the browser when potential service | 10 // The renderer uses this interface to tell the browser when potential service |
| 11 // worker clients are created and when service workers are starting up. | 11 // worker clients are created and when service workers are starting up. |
| 12 interface ServiceWorkerDispatcherHost { | 12 interface ServiceWorkerDispatcherHost { |
| 13 // Creates a content::ServiceWorkerProviderHost on the browser | 13 // Creates a content::ServiceWorkerProviderHost on the browser |
| 14 // process. |provider_info| has Mojo endpoints to connect the provider host | 14 // process. |provider_info| has Mojo endpoints to connect the provider host |
| 15 // and the provider on the renderer together. The lifetime of | 15 // and the provider on the renderer together. The lifetime of |
| 16 // ServiceWorkerProviderHost will be tied to the | 16 // ServiceWorkerProviderHost will be tied to the |
| 17 // mojom::ServiceWorkerProviderHost interface. | 17 // mojom::ServiceWorkerProviderHost interface. |
| 18 OnProviderCreated(ServiceWorkerProviderHostInfo provider_info); | 18 OnProviderCreated(ServiceWorkerProviderHostInfo provider_info); |
| 19 | |
| 20 // Informs the browser that a service worker is starting up. |provider_id| | |
| 21 // identifies the ServiceWorkerProviderHost hosting the service | |
| 22 // worker. |version_id| identifies the ServiceWorkerVersion and | |
| 23 // |embedded_worker_id| identifies the EmbeddedWorkerInstance. | |
| 24 OnSetHostedVersionId(int32 provider_id, | |
| 25 int64 version_id, | |
| 26 int32 embedded_worker_id); | |
| 27 }; | 19 }; |
| OLD | NEW |