blob: 1a893fac15d5b143faca86cb263ec036e8735f59 [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 "third_party/WebKit/public/platform/web_feature.mojom";
// Each shared worker has a corresponding host. The host controls the lifetime
// of the shared worker. This interface is used by the shared worker to talk to
// its host.
interface SharedWorkerHost {
// Called in response to SharedWorker's Connect method. The |connection_id|
// parameter is the same value passed to the Connect method.
OnConnected(int32 connection_id);
// Indicates that the shared worker self-closed. This should trigger the host
// to terminate the shared worker.
OnContextClosed();
// Indicates that the shared worker is ready for inspection.
OnReadyForInspection();
// Indicates that the script successfully loaded.
OnScriptLoaded();
// Indicates that the script failed to load.
OnScriptLoadFailed();
// Indicates that the shared worker used a feature. This is intended to be
// logged by the client-side feature logging infrastructure.
OnFeatureUsed(blink.mojom.WebFeature feature);
};