blob: 0ff30a396fe3aa464375a534a9216ee40b4f305c [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";
import "third_party/WebKit/public/web/shared_worker_creation_context_type.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);
};