Chromium Code Reviews| Index: media/cdm/ppapi/cdm_adapter.h |
| diff --git a/media/cdm/ppapi/cdm_adapter.h b/media/cdm/ppapi/cdm_adapter.h |
| index 0189c1fc353cdecf02014ceb9e09a864c88dc0f3..8ac2fc76eaf4a654f50717cc5fc32ef715273b28 100644 |
| --- a/media/cdm/ppapi/cdm_adapter.h |
| +++ b/media/cdm/ppapi/cdm_adapter.h |
| @@ -43,7 +43,8 @@ void* GetCdmHost(int host_interface_version, void* user_data); |
| class CdmAdapter : public pp::Instance, |
| public pp::ContentDecryptor_Private, |
| public cdm::Host_4, |
| - public cdm::Host_5 { |
| + public cdm::Host_5, |
| + public cdm::Host_6 { |
| public: |
| CdmAdapter(PP_Instance instance, pp::Module* module); |
| virtual ~CdmAdapter(); |
| @@ -66,6 +67,7 @@ class CdmAdapter : public pp::Instance, |
| virtual void UpdateSession(uint32_t promise_id, |
| const std::string& web_session_id, |
| pp::VarArrayBuffer response) OVERRIDE; |
| + // TODO(jrummell): Rename to CloseSession(). |
| virtual void ReleaseSession(uint32_t promise_id, |
| const std::string& web_session_id) OVERRIDE; |
| virtual void Decrypt( |
| @@ -85,10 +87,13 @@ class CdmAdapter : public pp::Instance, |
| PP_DecryptorStreamType decoder_type, |
| pp::Buffer_Dev encrypted_buffer, |
| const PP_EncryptedBlockInfo& encrypted_block_info) OVERRIDE; |
| - |
| - // cdm::Host_4 and cdm::Host_5 implementation. |
| virtual cdm::Buffer* Allocate(uint32_t capacity) OVERRIDE; |
|
ddorwin
2014/08/07 01:34:43
We should still note that this is cdm::Host to dif
jrummell
2014/08/07 20:44:30
Done.
|
| virtual void SetTimer(int64_t delay_ms, void* context) OVERRIDE; |
| + // TODO(jrummell): Pass these through Pepper. |
|
ddorwin
2014/08/07 01:34:43
... and add OVERRIDE.
jrummell
2014/08/07 20:44:30
Done.
|
| + virtual void GetUsableKeyIds(uint32_t promise_id, |
|
ddorwin
2014/08/07 01:34:44
These aren't part of a Host interface. See also li
jrummell
2014/08/07 20:44:30
Done.
|
| + const std::string& web_session_id); |
| + virtual void RemoveSession(uint32_t promise_id, |
|
ddorwin
2014/08/07 01:34:44
Swap order and move to line 73 to match cdm.h.
jrummell
2014/08/07 20:44:30
Done.
|
| + const std::string& web_session_id); |
| // cdm::Host_4 implementation. |
| virtual double GetCurrentWallTimeInSeconds() OVERRIDE; |
| @@ -126,10 +131,10 @@ class CdmAdapter : public pp::Instance, |
| uint32_t destination_url_length) OVERRIDE; |
| virtual void OnSessionKeysChange(const char* web_session_id, |
| uint32_t web_session_id_length, |
| - bool has_additional_usable_key); |
| + bool has_additional_usable_key) OVERRIDE; |
| virtual void OnExpirationChange(const char* web_session_id, |
| uint32_t web_session_id_length, |
| - cdm::Time new_expiry_time); |
| + cdm::Time new_expiry_time) OVERRIDE; |
| virtual void OnSessionReady(const char* web_session_id, |
| uint32_t web_session_id_length) OVERRIDE; |
| virtual void OnSessionClosed(const char* web_session_id, |
| @@ -141,7 +146,17 @@ class CdmAdapter : public pp::Instance, |
| const char* error_message, |
| uint32_t error_message_length) OVERRIDE; |
| - // cdm::Host_4 and cdm::Host_5 implementation. |
| + // cdm::Host_6 implementation. |
| + virtual cdm::Time GetCurrentWallTime() OVERRIDE; |
| + virtual void OnResolveKeyIdsPromise(uint32_t promise_id, |
| + const cdm::BinaryData* usable_key_ids, |
| + uint32_t usable_key_ids_length) OVERRIDE; |
| + virtual void OnSessionUsableKeysChange( |
| + const char* web_session_id, |
| + uint32_t web_session_id_length, |
| + bool has_additional_usable_key) OVERRIDE; |
| + |
| + // cdm::Host_4, cdm::Host_5 and cdm::Host_6 implementation. |
| virtual void SendPlatformChallenge(const char* service_id, |
| uint32_t service_id_length, |
| const char* challenge, |
| @@ -186,6 +201,10 @@ class CdmAdapter : public pp::Instance, |
| int32_t result, |
| uint32_t promise_id, |
| const std::string& web_session_id); |
| + void SendPromiseResolvedWithUsableKeyIdsInternal( |
| + int32_t result, |
| + uint32_t promise_id, |
| + std::vector<std::vector<uint8> > key_ids); |
| void SendPromiseRejectedInternal(int32_t result, |
| uint32_t promise_id, |
| const SessionError& error); |
| @@ -200,6 +219,12 @@ class CdmAdapter : public pp::Instance, |
| void SendSessionErrorInternal(int32_t result, |
| const std::string& web_session_id, |
| const SessionError& error); |
| + void SendSessionUsableKeysChangeInternal(int32_t result, |
| + const std::string& web_session_id, |
| + bool has_additional_usable_key); |
| + void SendExpirationChangeInternal(int32_t result, |
| + const std::string& web_session_id, |
| + cdm::Time new_expiry_time); |
| void RejectPromise(uint32_t promise_id, |
| cdm::Error error, |
| uint32_t system_code, |