blob: ec84b43491b394d0a31e984ef2454b98412f9f9d [file] [log] [blame]
// 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_client.mojom";
import "content/common/shared_worker/shared_worker_info.mojom";
import "third_party/blink/public/mojom/blob/blob_url_store.mojom";
import "third_party/blink/public/mojom/worker/shared_worker_creation_context_type.mojom";
// This interface is exposed to enable a client to create and connect to a
// shared worker.
interface SharedWorkerConnector {
// Connect to (and create if necessary) a SharedWorker specified by |info|.
// The SharedWorker will be terminated if all clients go away.
// |blob_url_token| should be non-null when the worker is loaded from a blob:
// URL. The token will then be used to look up the blob associated with the
// blob URL. Without this by the time the worker code starts fetching
// the URL the blob URL might no longer be valid.
Connect(SharedWorkerInfo info,
SharedWorkerClient client,
blink.mojom.SharedWorkerCreationContextType creation_context_type,
handle<message_pipe> message_port,
blink.mojom.BlobURLToken? blob_url_token);
};