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

Unified Diff: ppapi/cpp/dev/content_decryptor_dev.cc

Issue 10836038: Call CDMWrapper from PpapiDecryptor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add PP_DecryptionBuffer_Dev and update Decrypt() PPP call. Created 8 years, 4 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
Index: ppapi/cpp/dev/content_decryptor_dev.cc
diff --git a/ppapi/cpp/dev/content_decryptor_dev.cc b/ppapi/cpp/dev/content_decryptor_dev.cc
index 6946ac2b1e4b0b53dcc1a5db2143aca55937ca22..e151c64da8b1afd9d058a40d03bfecef1eb75308 100644
--- a/ppapi/cpp/dev/content_decryptor_dev.cc
+++ b/ppapi/cpp/dev/content_decryptor_dev.cc
@@ -52,17 +52,16 @@ PP_Bool CancelKeyRequest(PP_Instance instance,
static_cast<ContentDecryptor_Dev*>(object)->CancelKeyRequest(session_id));
}
-
PP_Bool Decrypt(PP_Instance instance,
- PP_Resource encrypted_block,
- PP_CompletionCallback callback) {
+ const struct PP_DecryptionBuffer_Dev* encrypted_buffer) {
void* object =
Instance::GetPerInstanceObject(instance, kPPPContentDecryptorInterface);
if (!object)
return PP_FALSE;
+ if (!encrypted_buffer)
+ return PP_FALSE;
return PP_FromBool(
- static_cast<ContentDecryptor_Dev*>(object)->Decrypt(encrypted_block,
- callback));
+ static_cast<ContentDecryptor_Dev*>(object)->Decrypt(*encrypted_buffer));
}
PP_Bool DecryptAndDecode(PP_Instance instance,
@@ -151,12 +150,12 @@ void ContentDecryptor_Dev::KeyError(PP_Var key_system,
}
void ContentDecryptor_Dev::DeliverBlock(PP_Resource decrypted_block,
- PP_CompletionCallback callback) {
+ uint32_t id) {
if (has_interface<PPB_ContentDecryptor_Dev>()) {
get_interface<PPB_ContentDecryptor_Dev>()->DeliverBlock(
associated_instance_.pp_instance(),
decrypted_block,
- callback);
+ id);
}
}

Powered by Google App Engine
This is Rietveld 408576698