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..8385ce7a9994a87ac5175c0c2f90c0c08f32757d 100644 |
--- a/ppapi/proxy/ppp_content_decryptor_private_proxy.cc |
+++ b/ppapi/proxy/ppp_content_decryptor_private_proxy.cc |
@@ -126,7 +126,7 @@ void Initialize(PP_Instance instance, |
void CreateSession(PP_Instance instance, |
uint32_t session_id, |
- PP_Var type, |
+ PP_Var content_type, |
PP_Var init_data) { |
HostDispatcher* dispatcher = HostDispatcher::GetForInstance(instance); |
if (!dispatcher) { |
@@ -138,10 +138,26 @@ void CreateSession(PP_Instance instance, |
API_ID_PPP_CONTENT_DECRYPTOR_PRIVATE, |
instance, |
session_id, |
- SerializedVarSendInput(dispatcher, type), |
+ SerializedVarSendInput(dispatcher, content_type), |
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, |
@@ -437,17 +456,30 @@ void PPP_ContentDecryptor_Private_Proxy::OnMsgInitialize( |
void PPP_ContentDecryptor_Private_Proxy::OnMsgCreateSession( |
PP_Instance instance, |
uint32_t session_id, |
- SerializedVarReceiveInput type, |
+ SerializedVarReceiveInput content_type, |
SerializedVarReceiveInput init_data) { |
if (ppp_decryptor_impl_) { |
CallWhileUnlocked(ppp_decryptor_impl_->CreateSession, |
instance, |
session_id, |
- ExtractReceivedVarAndAddRef(dispatcher(), &type), |
+ ExtractReceivedVarAndAddRef(dispatcher(), &content_type), |
ExtractReceivedVarAndAddRef(dispatcher(), &init_data)); |
} |
} |
+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, |