blob: ae7e707b56366f9c30ae1b7ad967a7cf16189633 [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/blink/public/mojom/worker/shared_worker_creation_context_type.mojom";
import "third_party/blink/public/platform/web_feature.mojom";
// An interface used by clients (e.g., the renderer where "new SharedWorker()"
// was invoked) to observe events from a shared worker.
interface SharedWorkerClient {
// Indicates that the shared worker process has started (or may have already
// been started). The shared worker script is not necessarily loaded yet.
// This event will be followed by either OnConnected or OnScriptLoadFailed.
OnCreated(blink.mojom.SharedWorkerCreationContextType creation_context_type);
// Indicates that the shared worker process is up and running, script loaded.
OnConnected(array<blink.mojom.WebFeature> features_used);
// Indicates that the shared worker 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);
};