summaryrefslogtreecommitdiff
path: root/chromium/content/common/shared_worker/shared_worker_factory.mojom
blob: ef8dffb7ae0f113b41d24aab41d77834610e1c59 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// 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/mojom/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);
};