Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(776)

Unified Diff: ppapi/proxy/ppb_instance_proxy.cc

Issue 11106004: Allow null buffer resources to be returned through the PPB_ContentDecryptor_Private proxy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webkit/media/crypto/ppapi_decryptor.cc » ('j') | webkit/media/crypto/proxy_decryptor.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/ppb_instance_proxy.cc
diff --git a/ppapi/proxy/ppb_instance_proxy.cc b/ppapi/proxy/ppb_instance_proxy.cc
index 2e0fd825c11aa71b254bb6ac311d813afaf12ace..fb71a93297d9c215dcff599c01c9a5c3bd165eb6 100644
--- a/ppapi/proxy/ppb_instance_proxy.cc
+++ b/ppapi/proxy/ppb_instance_proxy.cc
@@ -522,10 +522,15 @@ void PPB_Instance_Proxy::KeyError(PP_Instance instance,
void PPB_Instance_Proxy::DeliverBlock(PP_Instance instance,
PP_Resource decrypted_block,
const PP_DecryptedBlockInfo* block_info) {
- Resource* object =
- PpapiGlobals::Get()->GetResourceTracker()->GetResource(decrypted_block);
- if (!object || object->pp_instance() != instance)
- return;
+ PP_Resource decrypted_block_host_resource = 0;
+
+ if (decrypted_block) {
+ Resource* object =
+ PpapiGlobals::Get()->GetResourceTracker()->GetResource(decrypted_block);
+ if (!object || object->pp_instance() != instance)
+ return;
+ decrypted_block_host_resource = object->host_resource().host_resource();
+ }
std::string serialized_block_info;
if (!SerializeBlockInfo(*block_info, &serialized_block_info))
@@ -534,7 +539,7 @@ void PPB_Instance_Proxy::DeliverBlock(PP_Instance instance,
dispatcher()->Send(
new PpapiHostMsg_PPBInstance_DeliverBlock(API_ID_PPB_INSTANCE,
instance,
- object->host_resource().host_resource(),
+ decrypted_block_host_resource,
serialized_block_info));
}
@@ -572,6 +577,7 @@ void PPB_Instance_Proxy::DecoderResetDone(PP_Instance instance,
request_id));
}
+// TODO(tomfinegan): Handle null decrypted_frame after landing other patches.
void PPB_Instance_Proxy::DeliverFrame(PP_Instance instance,
PP_Resource decrypted_frame,
const PP_DecryptedFrameInfo* frame_info) {
@@ -591,6 +597,7 @@ void PPB_Instance_Proxy::DeliverFrame(PP_Instance instance,
serialized_block_info));
}
+// TODO(tomfinegan): Handle null decrypted_samples after landing other patches.
void PPB_Instance_Proxy::DeliverSamples(
PP_Instance instance,
PP_Resource decrypted_samples,
« no previous file with comments | « no previous file | webkit/media/crypto/ppapi_decryptor.cc » ('j') | webkit/media/crypto/proxy_decryptor.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698