// 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.
// Input dictionary for the getExperimentalMediaIntegrityTokenProvider call.
dictionary GetMediaIntegrityTokenProviderParams {
[EnforceRange] unsigned long long cloudProjectNumber;
};
// WebView extension APIs.
[
RuntimeEnabled=BlinkExtensionWebView,
TargetOfExposed=AndroidWebView
] interface WebView {
// Get a MediaIntegrityTokenProvider, which can be used to request tokens
// from Google Play Services.
//
// Returns a promise containing a token provider, which will allow the caller
// to request integrity tokens. This call may take a considerable amount of
// time to resolve (> 1s).
//
// The promise may reject as a MediaIntegrityError.
[ NewObject,
CallWith=ScriptState,
HighEntropy,
RaisesException,
RuntimeEnabled=BlinkExtensionWebViewMediaIntegrity,
SecureContext,
Measure
]
Promise<MediaIntegrityTokenProvider>
getExperimentalMediaIntegrityTokenProvider(GetMediaIntegrityTokenProviderParams params);
};