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

Unified Diff: ppapi/cpp/private/content_decryptor_private.cc

Issue 131653003: Support LoadSession() in MediaKeys and PPP_ContentDecryptor_Private interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase only Created 6 years, 10 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/private/content_decryptor_private.cc
diff --git a/ppapi/cpp/private/content_decryptor_private.cc b/ppapi/cpp/private/content_decryptor_private.cc
index 776393a2e2037980219a015b273f7c77a29b0e06..7cad0a3a11491bc4e315eb06d208b93c9e56bac6 100644
--- a/ppapi/cpp/private/content_decryptor_private.cc
+++ b/ppapi/cpp/private/content_decryptor_private.cc
@@ -60,6 +60,22 @@ void CreateSession(PP_Instance instance,
->CreateSession(session_id, type_var.AsString(), init_data_array_buffer);
}
+void LoadSession(PP_Instance instance,
+ uint32_t session_id,
+ PP_Var web_session_id_arg) {
+ void* object =
+ Instance::GetPerInstanceObject(instance, kPPPContentDecryptorInterface);
+ if (!object)
+ return;
+
+ pp::Var web_session_id_var(pp::PASS_REF, web_session_id_arg);
+ if (!web_session_id_var.is_string())
+ return;
+
+ static_cast<ContentDecryptor_Private*>(object)
+ ->LoadSession(session_id, web_session_id_var.AsString());
+}
+
void UpdateSession(PP_Instance instance,
uint32_t session_id,
PP_Var response_arg) {
@@ -177,6 +193,7 @@ void DecryptAndDecode(PP_Instance instance,
const PPP_ContentDecryptor_Private ppp_content_decryptor = {
&Initialize,
&CreateSession,
+ &LoadSession,
&UpdateSession,
&ReleaseSession,
&Decrypt,
« no previous file with comments | « ppapi/cpp/private/content_decryptor_private.h ('k') | ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698