// Copyright 2014 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_MEDIA_NEW_SESSION_CDM_RESULT_PROMISE_H_ #define THIRD_PARTY_BLINK_RENDERER_PLATFORM_MEDIA_NEW_SESSION_CDM_RESULT_PROMISE_H_ #include <stdint.h> #include <string> #include "base/functional/callback.h" #include "base/time/time.h" #include "media/base/cdm_promise.h" #include "third_party/blink/public/platform/web_content_decryption_module_result.h" #include "third_party/blink/renderer/platform/platform_export.h" namespace blink { enum class SessionInitStatus { … }; SessionInitializedCB; // Special class for resolving a new session promise. Resolving a new session // promise returns the session ID (as a string), but the blink promise needs // to get passed a SessionStatus. This class converts the session id to a // SessionStatus by calling |new_session_created_cb|. The value returned by // |new_session_created_cb| must be in |expected_statuses| for the promise to // be resolved. If it's not in the list, the promise will be rejected. class PLATFORM_EXPORT NewSessionCdmResultPromise : public media::CdmPromiseTemplate<std::string> { … }; } // namespace blink #endif // THIRD_PARTY_BLINK_RENDERER_PLATFORM_MEDIA_NEW_SESSION_CDM_RESULT_PROMISE_H_