#include "media/mojo/clients/mojo_cdm_factory.h"
#include <utility>
#include "base/functional/bind.h"
#include "base/location.h"
#include "base/memory/scoped_refptr.h"
#include "base/task/single_thread_task_runner.h"
#include "media/base/content_decryption_module.h"
#include "media/base/key_systems.h"
#include "media/cdm/aes_decryptor.h"
#include "media/mojo/clients/mojo_cdm.h"
#include "media/mojo/mojom/content_decryption_module.mojom.h"
#include "media/mojo/mojom/interface_factory.mojom.h"
#include "mojo/public/cpp/bindings/callback_helpers.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "mojo/public/cpp/bindings/remote.h"
namespace media {
namespace {
void OnCdmCreated(
const CdmConfig& cdm_config,
const SessionMessageCB& session_message_cb,
const SessionClosedCB& session_closed_cb,
const SessionKeysChangeCB& session_keys_change_cb,
const SessionExpirationUpdateCB& session_expiration_update_cb,
CdmCreatedCB cdm_created_cb,
mojo::PendingRemote<mojom::ContentDecryptionModule> cdm_remote,
media::mojom::CdmContextPtr cdm_context,
CreateCdmStatus status) { … }
}
MojoCdmFactory::MojoCdmFactory(
media::mojom::InterfaceFactory* interface_factory,
KeySystems* key_systems)
: … { … }
MojoCdmFactory::~MojoCdmFactory() = default;
void MojoCdmFactory::Create(
const CdmConfig& cdm_config,
const SessionMessageCB& session_message_cb,
const SessionClosedCB& session_closed_cb,
const SessionKeysChangeCB& session_keys_change_cb,
const SessionExpirationUpdateCB& session_expiration_update_cb,
CdmCreatedCB cdm_created_cb) { … }
}