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

Unified Diff: ppapi/proxy/ppp_content_decryptor_private_proxy.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
« no previous file with comments | « ppapi/proxy/ppp_content_decryptor_private_proxy.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 167e4764d38149ae59d5d455a5a802c9ce21a152..da0209764baedbafb28057375f0fdee29b0da0e1 100644
--- a/ppapi/proxy/ppp_content_decryptor_private_proxy.cc
+++ b/ppapi/proxy/ppp_content_decryptor_private_proxy.cc
@@ -142,6 +142,22 @@ void CreateSession(PP_Instance instance,
SerializedVarSendInput(dispatcher, init_data)));
}
+void LoadSession(PP_Instance instance,
+ uint32_t session_id,
+ PP_Var web_session_id) {
+ HostDispatcher* dispatcher = HostDispatcher::GetForInstance(instance);
+ if (!dispatcher) {
+ NOTREACHED();
+ return;
+ }
+
+ dispatcher->Send(new PpapiMsg_PPPContentDecryptor_LoadSession(
+ API_ID_PPP_CONTENT_DECRYPTOR_PRIVATE,
+ instance,
+ session_id,
+ SerializedVarSendInput(dispatcher, web_session_id)));
+}
+
void UpdateSession(PP_Instance instance, uint32_t session_id, PP_Var response) {
HostDispatcher* dispatcher = HostDispatcher::GetForInstance(instance);
if (!dispatcher) {
@@ -357,6 +373,7 @@ void DecryptAndDecode(PP_Instance instance,
static const PPP_ContentDecryptor_Private content_decryptor_interface = {
&Initialize,
&CreateSession,
+ &LoadSession,
&UpdateSession,
&ReleaseSession,
&Decrypt,
@@ -401,6 +418,8 @@ bool PPP_ContentDecryptor_Private_Proxy::OnMessageReceived(
OnMsgInitialize)
IPC_MESSAGE_HANDLER(PpapiMsg_PPPContentDecryptor_CreateSession,
OnMsgCreateSession)
+ IPC_MESSAGE_HANDLER(PpapiMsg_PPPContentDecryptor_LoadSession,
+ OnMsgLoadSession)
IPC_MESSAGE_HANDLER(PpapiMsg_PPPContentDecryptor_UpdateSession,
OnMsgUpdateSession)
IPC_MESSAGE_HANDLER(PpapiMsg_PPPContentDecryptor_ReleaseSession,
@@ -448,6 +467,19 @@ void PPP_ContentDecryptor_Private_Proxy::OnMsgCreateSession(
}
}
+void PPP_ContentDecryptor_Private_Proxy::OnMsgLoadSession(
+ PP_Instance instance,
+ uint32_t session_id,
+ SerializedVarReceiveInput web_session_id) {
+ if (ppp_decryptor_impl_) {
+ CallWhileUnlocked(
+ ppp_decryptor_impl_->LoadSession,
+ instance,
+ session_id,
+ ExtractReceivedVarAndAddRef(dispatcher(), &web_session_id));
+ }
+}
+
void PPP_ContentDecryptor_Private_Proxy::OnMsgUpdateSession(
PP_Instance instance,
uint32_t session_id,
« no previous file with comments | « ppapi/proxy/ppp_content_decryptor_private_proxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698