Index: media/cdm/ppapi/cdm_wrapper.h |
diff --git a/media/cdm/ppapi/cdm_wrapper.h b/media/cdm/ppapi/cdm_wrapper.h |
index f11672cadc33bf51632900c57f2581bd163be7d1..9ae67ccca7968eb927d1c07159dbbe814d3d678d 100644 |
--- a/media/cdm/ppapi/cdm_wrapper.h |
+++ b/media/cdm/ppapi/cdm_wrapper.h |
@@ -42,6 +42,10 @@ class CdmWrapper { |
virtual ~CdmWrapper() {}; |
+ // TODO(jrummell): Remove return value when CDM4/5 are removed. |
+ virtual bool SetServerCertificate(uint32_t promise_id, |
+ const uint8_t* server_certificate_data, |
+ uint32_t server_certificate_data_size) = 0; |
virtual void CreateSession(uint32_t promise_id, |
const char* init_data_type, |
uint32_t init_data_type_size, |
@@ -175,6 +179,15 @@ class CdmWrapperImpl : public CdmWrapper { |
std::equal(data, data + header.length(), header.begin()); |
} |
+ virtual bool SetServerCertificate( |
+ uint32_t promise_id, |
+ const uint8_t* server_certificate_data, |
+ uint32_t server_certificate_data_size) OVERRIDE { |
+ cdm_->SetServerCertificate( |
+ promise_id, server_certificate_data, server_certificate_data_size); |
+ return true; |
+ } |
+ |
virtual void CreateSession(uint32_t promise_id, |
const char* init_data_type, |
uint32_t init_data_type_size, |
@@ -221,13 +234,6 @@ class CdmWrapperImpl : public CdmWrapper { |
response_size); |
} |
- virtual bool GetUsableKeyIds(uint32_t promise_id, |
- const char* web_session_id, |
- uint32_t web_session_id_size) OVERRIDE { |
- cdm_->GetUsableKeyIds(promise_id, web_session_id, web_session_id_size); |
- return true; |
- } |
- |
virtual bool CloseSession(uint32_t promise_id, |
const char* web_session_id, |
uint32_t web_session_id_size) OVERRIDE { |
@@ -241,6 +247,13 @@ class CdmWrapperImpl : public CdmWrapper { |
cdm_->RemoveSession(promise_id, web_session_id, web_session_id_size); |
} |
+ virtual bool GetUsableKeyIds(uint32_t promise_id, |
+ const char* web_session_id, |
+ uint32_t web_session_id_size) OVERRIDE { |
+ cdm_->GetUsableKeyIds(promise_id, web_session_id, web_session_id_size); |
+ return true; |
+ } |
+ |
virtual void TimerExpired(void* context) OVERRIDE { |
cdm_->TimerExpired(context); |
} |
@@ -406,6 +419,14 @@ class CdmWrapperImpl : public CdmWrapper { |
// TODO(jrummell): Remove these once Host_4 interface is removed. |
template <> |
+bool CdmWrapperImpl<cdm::ContentDecryptionModule_4>::SetServerCertificate( |
+ uint32_t promise_id, |
+ const uint8_t* server_certificate_data, |
+ uint32_t server_certificate_data_size) { |
+ return false; |
+} |
+ |
+template <> |
void CdmWrapperImpl<cdm::ContentDecryptionModule_4>::CreateSession( |
uint32_t promise_id, |
const char* init_data_type, |
@@ -515,6 +536,14 @@ CdmWrapperImpl<cdm::ContentDecryptionModule_4>::DecryptAndDecodeSamples( |
// TODO(jrummell): Remove these once Host_5 interface is removed. |
template <> |
+bool CdmWrapperImpl<cdm::ContentDecryptionModule_5>::SetServerCertificate( |
+ uint32_t promise_id, |
+ const uint8_t* server_certificate_data, |
+ uint32_t server_certificate_data_size) { |
+ return false; |
+} |
+ |
+template <> |
void CdmWrapperImpl<cdm::ContentDecryptionModule_5>::CreateSession( |
uint32_t promise_id, |
const char* init_data_type, |