| // 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 "content/common/shared_worker/shared_worker.mojom"; |
| import "content/common/shared_worker/shared_worker_host.mojom"; |
| import "content/common/shared_worker/shared_worker_info.mojom"; |
| import "mojo/common/unguessable_token.mojom"; |
| import "services/service_manager/public/interfaces/interface_provider.mojom"; |
| import "third_party/WebKit/public/web/worker_content_settings_proxy.mojom"; |
| |
| // The name of the InterfaceProviderSpec in service manifests used by the |
| // frame tree to expose shared-worker-specific interfaces between renderer and |
| // browser. |
| const string kNavigation_SharedWorkerSpec = "navigation:shared_worker"; |
| |
| // This interface is used to instantiate a shared worker. It is exported from a |
| // child process where the shared worker should run. |
| interface SharedWorkerFactory { |
| // Create a new shared worker. The |host| interface receives events from the |
| // shared worker. |
| // |
| // TODO(sammc): Change shared workers to obtain |content_settings| via |
| // |interface_provider| instead of receiving plumbing it here. |
| CreateSharedWorker( |
| SharedWorkerInfo info, |
| bool pause_on_start, |
| mojo.common.mojom.UnguessableToken devtools_worker_token, |
| blink.mojom.WorkerContentSettingsProxy content_settings, |
| SharedWorkerHost host, |
| SharedWorker& shared_worker, |
| service_manager.mojom.InterfaceProvider interface_provider); |
| }; |