diff options
author | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2015-10-13 13:24:50 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2015-10-14 10:57:25 +0000 |
commit | af3d4809763ef308f08ced947a73b624729ac7ea (patch) | |
tree | 4402b911e30383f6c6dace1e8cf3b8e85355db3a /chromium/media/mojo/services/mojo_cdm_service.h | |
parent | 0e8ff63a407fe323e215bb1a2c423c09a4747c8a (diff) | |
download | qtwebengine-chromium-af3d4809763ef308f08ced947a73b624729ac7ea.tar.gz |
BASELINE: Update Chromium to 47.0.2526.14
Also adding in sources needed for spellchecking.
Change-Id: Idd44170fa1616f26315188970a8d5ba7d472b18a
Reviewed-by: Michael BrĂ¼ning <michael.bruning@theqtcompany.com>
Diffstat (limited to 'chromium/media/mojo/services/mojo_cdm_service.h')
-rw-r--r-- | chromium/media/mojo/services/mojo_cdm_service.h | 72 |
1 files changed, 40 insertions, 32 deletions
diff --git a/chromium/media/mojo/services/mojo_cdm_service.h b/chromium/media/mojo/services/mojo_cdm_service.h index 951d701f704..a2424c8a1a8 100644 --- a/chromium/media/mojo/services/mojo_cdm_service.h +++ b/chromium/media/mojo/services/mojo_cdm_service.h @@ -12,57 +12,64 @@ #include "media/base/media_keys.h" #include "media/mojo/interfaces/content_decryption_module.mojom.h" #include "media/mojo/services/mojo_cdm_promise.h" +#include "media/mojo/services/mojo_cdm_service_context.h" #include "mojo/application/public/interfaces/service_provider.mojom.h" #include "mojo/public/cpp/bindings/strong_binding.h" namespace media { class CdmFactory; -class MojoCdmServiceContext; -// A mojo::ContentDecryptionModule implementation backed by a media::MediaKeys. -class MojoCdmService : public mojo::ContentDecryptionModule { +// A interfaces::ContentDecryptionModule implementation backed by a +// media::MediaKeys. +class MojoCdmService : public interfaces::ContentDecryptionModule { public: // Constructs a MojoCdmService and strongly binds it to the |request|. - MojoCdmService(MojoCdmServiceContext* context, - mojo::ServiceProvider* service_provider, - CdmFactory* cdm_factory, - mojo::InterfaceRequest<mojo::ContentDecryptionModule> request); + MojoCdmService( + base::WeakPtr<MojoCdmServiceContext> context, + mojo::ServiceProvider* service_provider, + CdmFactory* cdm_factory, + mojo::InterfaceRequest<interfaces::ContentDecryptionModule> request); ~MojoCdmService() final; - // mojo::ContentDecryptionModule implementation. - void SetClient(mojo::ContentDecryptionModuleClientPtr client) final; - void Initialize( - const mojo::String& key_system, - const mojo::String& security_origin, - mojo::CdmConfigPtr cdm_config, - int32_t cdm_id, - const mojo::Callback<void(mojo::CdmPromiseResultPtr)>& callback) final; + // interfaces::ContentDecryptionModule implementation. + void SetClient(interfaces::ContentDecryptionModuleClientPtr client) final; + void Initialize(const mojo::String& key_system, + const mojo::String& security_origin, + interfaces::CdmConfigPtr cdm_config, + int32_t cdm_id, + const mojo::Callback<void(interfaces::CdmPromiseResultPtr)>& + callback) final; void SetServerCertificate( mojo::Array<uint8_t> certificate_data, - const mojo::Callback<void(mojo::CdmPromiseResultPtr)>& callback) final; + const mojo::Callback<void(interfaces::CdmPromiseResultPtr)>& callback) + final; void CreateSessionAndGenerateRequest( - mojo::ContentDecryptionModule::SessionType session_type, - mojo::ContentDecryptionModule::InitDataType init_data_type, + interfaces::ContentDecryptionModule::SessionType session_type, + interfaces::ContentDecryptionModule::InitDataType init_data_type, mojo::Array<uint8_t> init_data, - const mojo::Callback<void(mojo::CdmPromiseResultPtr, mojo::String)>& + const mojo::Callback<void(interfaces::CdmPromiseResultPtr, mojo::String)>& + callback) final; + void LoadSession( + interfaces::ContentDecryptionModule::SessionType session_type, + const mojo::String& session_id, + const mojo::Callback<void(interfaces::CdmPromiseResultPtr, mojo::String)>& callback) final; - void LoadSession(mojo::ContentDecryptionModule::SessionType session_type, - const mojo::String& session_id, - const mojo::Callback<void(mojo::CdmPromiseResultPtr, - mojo::String)>& callback) final; void UpdateSession( const mojo::String& session_id, mojo::Array<uint8_t> response, - const mojo::Callback<void(mojo::CdmPromiseResultPtr)>& callback) final; - void CloseSession( - const mojo::String& session_id, - const mojo::Callback<void(mojo::CdmPromiseResultPtr)>& callback) final; + const mojo::Callback<void(interfaces::CdmPromiseResultPtr)>& callback) + final; + void CloseSession(const mojo::String& session_id, + const mojo::Callback<void(interfaces::CdmPromiseResultPtr)>& + callback) final; void RemoveSession( const mojo::String& session_id, - const mojo::Callback<void(mojo::CdmPromiseResultPtr)>& callback) final; - void GetDecryptor(mojo::InterfaceRequest<mojo::Decryptor> decryptor) final; + const mojo::Callback<void(interfaces::CdmPromiseResultPtr)>& callback) + final; + void GetDecryptor( + mojo::InterfaceRequest<interfaces::Decryptor> decryptor) final; // Get CdmContext to be used by the media pipeline. CdmContext* GetCdmContext(); @@ -90,8 +97,9 @@ class MojoCdmService : public mojo::ContentDecryptionModule { uint32_t system_code, const std::string& error_message); - mojo::StrongBinding<mojo::ContentDecryptionModule> binding_; - MojoCdmServiceContext* context_; + mojo::StrongBinding<interfaces::ContentDecryptionModule> binding_; + base::WeakPtr<MojoCdmServiceContext> context_; + mojo::ServiceProvider* service_provider_; CdmFactory* cdm_factory_; scoped_ptr<MediaKeys> cdm_; @@ -99,7 +107,7 @@ class MojoCdmService : public mojo::ContentDecryptionModule { // Set to a valid CDM ID if the |cdm_| is successfully created. int cdm_id_; - mojo::ContentDecryptionModuleClientPtr client_; + interfaces::ContentDecryptionModuleClientPtr client_; base::WeakPtr<MojoCdmService> weak_this_; base::WeakPtrFactory<MojoCdmService> weak_factory_; |