#include "third_party/blink/renderer/modules/encryptedmedia/content_decryption_module_result_promise.h"
#include "media/base/key_systems.h"
#include "services/metrics/public/cpp/ukm_builders.h"
#include "services/metrics/public/cpp/ukm_recorder.h"
#include "third_party/blink/public/platform/web_content_decryption_module.h"
#include "third_party/blink/public/platform/web_string.h"
#include "third_party/blink/renderer/bindings/core/v8/script_promise.h"
#include "third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_throw_dom_exception.h"
#include "third_party/blink/renderer/core/dom/document.h"
#include "third_party/blink/renderer/core/dom/dom_exception.h"
#include "third_party/blink/renderer/core/execution_context/execution_context.h"
#include "third_party/blink/renderer/core/frame/local_dom_window.h"
#include "third_party/blink/renderer/platform/bindings/exception_state.h"
#include "third_party/blink/renderer/platform/bindings/script_state.h"
#include "third_party/blink/renderer/platform/wtf/text/string_builder.h"
namespace blink {
void WebCdmExceptionToPromiseRejection(
ScriptPromiseResolverBase* resolver,
WebContentDecryptionModuleException cdm_exception,
const String& message) { … }
ContentDecryptionModuleResultPromise::ContentDecryptionModuleResultPromise(
ScriptPromiseResolverBase* resolver,
const MediaKeysConfig& config,
EmeApiType api_type)
: … { … }
ContentDecryptionModuleResultPromise::~ContentDecryptionModuleResultPromise() =
default;
void ContentDecryptionModuleResultPromise::Complete() { … }
void ContentDecryptionModuleResultPromise::CompleteWithContentDecryptionModule(
std::unique_ptr<WebContentDecryptionModule> cdm) { … }
void ContentDecryptionModuleResultPromise::CompleteWithSession(
WebContentDecryptionModuleResult::SessionStatus status) { … }
void ContentDecryptionModuleResultPromise::CompleteWithKeyStatus(
WebEncryptedMediaKeyInformation::KeyStatus) { … }
void ContentDecryptionModuleResultPromise::CompleteWithError(
WebContentDecryptionModuleException exception_code,
uint32_t system_code,
const WebString& error_message) { … }
ExecutionContext* ContentDecryptionModuleResultPromise::GetExecutionContext()
const { … }
bool ContentDecryptionModuleResultPromise::IsValidToFulfillPromise() { … }
MediaKeysConfig ContentDecryptionModuleResultPromise::GetMediaKeysConfig() { … }
void ContentDecryptionModuleResultPromise::Trace(Visitor* visitor) const { … }
}