| Index: ppapi/proxy/ppp_content_decryptor_private_proxy.cc
|
| diff --git a/ppapi/proxy/ppp_content_decryptor_private_proxy.cc b/ppapi/proxy/ppp_content_decryptor_private_proxy.cc
|
| index 91d81154a4658efd8ce0901ac3c3f1e6683a7ff6..c550eb1ebadfaff98e67d7b0944a9af9cf3f7c99 100644
|
| --- a/ppapi/proxy/ppp_content_decryptor_private_proxy.cc
|
| +++ b/ppapi/proxy/ppp_content_decryptor_private_proxy.cc
|
| @@ -142,8 +142,8 @@ void CancelKeyRequest(PP_Instance instance, PP_Var session_id) {
|
| }
|
|
|
| void Decrypt(PP_Instance instance,
|
| - PP_Resource encrypted_block,
|
| - const PP_EncryptedBlockInfo* encrypted_block_info) {
|
| + PP_Resource encrypted_block,
|
| + const PP_EncryptedBlockInfo* encrypted_block_info) {
|
| HostDispatcher* dispatcher = HostDispatcher::GetForInstance(instance);
|
| if (!dispatcher) {
|
| NOTREACHED();
|
| @@ -185,6 +185,40 @@ void Decrypt(PP_Instance instance,
|
| serialized_block_info));
|
| }
|
|
|
| +void DeinitializeDecoder(PP_Instance instance,
|
| + PP_StreamType decoder_type,
|
| + uint32_t request_id) {
|
| + HostDispatcher* dispatcher = HostDispatcher::GetForInstance(instance);
|
| + if (!dispatcher) {
|
| + NOTREACHED();
|
| + return;
|
| + }
|
| +
|
| + dispatcher->Send(
|
| + new PpapiMsg_PPPContentDecryptor_DeinitializeDecoder(
|
| + API_ID_PPP_CONTENT_DECRYPTOR_PRIVATE,
|
| + instance,
|
| + decoder_type,
|
| + request_id));
|
| +}
|
| +
|
| +void ResetDecoder(PP_Instance instance,
|
| + PP_StreamType decoder_type,
|
| + uint32_t request_id) {
|
| + HostDispatcher* dispatcher = HostDispatcher::GetForInstance(instance);
|
| + if (!dispatcher) {
|
| + NOTREACHED();
|
| + return;
|
| + }
|
| +
|
| + dispatcher->Send(
|
| + new PpapiMsg_PPPContentDecryptor_ResetDecoder(
|
| + API_ID_PPP_CONTENT_DECRYPTOR_PRIVATE,
|
| + instance,
|
| + decoder_type,
|
| + request_id));
|
| +}
|
| +
|
| void DecryptAndDecodeFrame(
|
| PP_Instance instance,
|
| PP_Resource encrypted_frame,
|
| @@ -235,6 +269,8 @@ static const PPP_ContentDecryptor_Private content_decryptor_interface = {
|
| &AddKey,
|
| &CancelKeyRequest,
|
| &Decrypt,
|
| + &DeinitializeDecoder,
|
| + &ResetDecoder,
|
| &DecryptAndDecodeFrame
|
| };
|
|
|
| @@ -272,6 +308,10 @@ bool PPP_ContentDecryptor_Private_Proxy::OnMessageReceived(
|
| OnMsgCancelKeyRequest)
|
| IPC_MESSAGE_HANDLER(PpapiMsg_PPPContentDecryptor_Decrypt,
|
| OnMsgDecrypt)
|
| + IPC_MESSAGE_HANDLER(PpapiMsg_PPPContentDecryptor_DeinitializeDecoder,
|
| + OnMsgDeinitializeDecoder)
|
| + IPC_MESSAGE_HANDLER(PpapiMsg_PPPContentDecryptor_ResetDecoder,
|
| + OnMsgResetDecoder)
|
| IPC_MESSAGE_HANDLER(PpapiMsg_PPPContentDecryptor_DecryptAndDecodeFrame,
|
| OnMsgDecryptAndDecodeFrame)
|
| IPC_MESSAGE_UNHANDLED(handled = false)
|
| @@ -335,6 +375,32 @@ void PPP_ContentDecryptor_Private_Proxy::OnMsgDecrypt(
|
| }
|
| }
|
|
|
| +void PPP_ContentDecryptor_Private_Proxy::OnMsgDeinitializeDecoder(
|
| + PP_Instance instance,
|
| + PP_StreamType decoder_type,
|
| + uint32_t request_id) {
|
| + if (ppp_decryptor_impl_) {
|
| + CallWhileUnlocked(
|
| + ppp_decryptor_impl_->DeinitializeDecoder,
|
| + instance,
|
| + decoder_type,
|
| + request_id);
|
| + }
|
| +}
|
| +
|
| +void PPP_ContentDecryptor_Private_Proxy::OnMsgResetDecoder(
|
| + PP_Instance instance,
|
| + PP_StreamType decoder_type,
|
| + uint32_t request_id) {
|
| + if (ppp_decryptor_impl_) {
|
| + CallWhileUnlocked(
|
| + ppp_decryptor_impl_->ResetDecoder,
|
| + instance,
|
| + decoder_type,
|
| + request_id);
|
| + }
|
| +}
|
| +
|
| void PPP_ContentDecryptor_Private_Proxy::OnMsgDecryptAndDecodeFrame(
|
| PP_Instance instance,
|
| const PPPDecryptor_Buffer& encrypted_frame,
|
|
|