chromium/third_party/blink/renderer/extensions/webview/media_integrity/media_integrity_error.idl

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

enum MediaIntegrityErrorName {
  "internal-error",
  "non-recoverable-error",
  "api-disabled-by-application",
  "invalid-argument",
  "token-provider-invalid"
};

// Constructor parameter for MediaIntegrityError.
dictionary MediaIntegrityErrorOptions {
    required MediaIntegrityErrorName mediaIntegrityErrorName;
};

// Error type for the WebView Media Integrity API.
[
    RuntimeEnabled=BlinkExtensionWebViewMediaIntegrity,
    Exposed=AndroidWebView
] interface MediaIntegrityError : DOMException {
    constructor(DOMString message, MediaIntegrityErrorOptions options);
    // Returns the specific error code.
    readonly attribute MediaIntegrityErrorName mediaIntegrityErrorName;
};