chromium/third_party/blink/public/mojom/worker/shared_worker.mojom

// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

module blink.mojom;

import "third_party/blink/public/mojom/messaging/message_port_descriptor.mojom";

// Interface used by the host to control the shared worker.
interface SharedWorker {
  // Called to establish a new client connection to the shared worker.  The
  // |connection_id| parameter will be echoed back to the host via the
  // OnConnected method.
  Connect(int32 connection_id, MessagePortDescriptor message_port);

  // Called to terminate the shared worker. This results in the shared worker
  // closing its end of the mojo connection.
  Terminate();
};