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

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: 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/cdm_wrapper.cc » ('j') | webkit/media/crypto/ppapi/cdm_wrapper.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 373451237eb3dd105b87e54054757c6c5a144c3a..5f23e685995c2bb13ca74b2a0f5dd76630297fc0 100644
--- a/ppapi/proxy/ppb_instance_proxy.cc
+++ b/ppapi/proxy/ppb_instance_proxy.cc
@@ -516,10 +516,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))
@@ -528,10 +533,11 @@ 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));
}
+// 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) {
@@ -551,6 +557,7 @@ void PPB_Instance_Proxy::DeliverFrame(PP_Instance instance,
serialized_block_info));
}
+// TODO(tomfinegan): Handle null decrypted_frame after landing other patches.
Tom Finegan 2012/10/11 23:57:56 s/decrypted_frame/decrypted_samples/
ddorwin 2012/10/12 00:21:16 Done.
void PPB_Instance_Proxy::DeliverSamples(
PP_Instance instance,
PP_Resource decrypted_samples,
« no previous file with comments | « no previous file | webkit/media/crypto/ppapi/cdm_wrapper.cc » ('j') | webkit/media/crypto/ppapi/cdm_wrapper.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698