| Index: ppapi/proxy/ppb_instance_proxy.cc
|
| diff --git a/ppapi/proxy/ppb_instance_proxy.cc b/ppapi/proxy/ppb_instance_proxy.cc
|
| index 2780022d605b2e13f7efa82dbb956e71ff575379..d324af94b8726edc6721e681aa9c4a6063233246 100644
|
| --- a/ppapi/proxy/ppb_instance_proxy.cc
|
| +++ b/ppapi/proxy/ppb_instance_proxy.cc
|
| @@ -179,10 +179,16 @@ bool PPB_Instance_Proxy::OnMessageReceived(const IPC::Message& msg) {
|
| OnHostMsgPromiseResolved)
|
| IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_PromiseResolvedWithSession,
|
| OnHostMsgPromiseResolvedWithSession)
|
| + IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_PromiseResolvedWithKeyIds,
|
| + OnHostMsgPromiseResolvedWithKeyIds)
|
| IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_PromiseRejected,
|
| OnHostMsgPromiseRejected)
|
| IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_SessionMessage,
|
| OnHostMsgSessionMessage)
|
| + IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_SessionKeysChange,
|
| + OnHostMsgSessionKeysChange)
|
| + IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_SessionExpirationChange,
|
| + OnHostMsgSessionExpirationChange)
|
| IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_SessionReady,
|
| OnHostMsgSessionReady)
|
| IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_SessionClosed,
|
| @@ -577,6 +583,16 @@ void PPB_Instance_Proxy::PromiseResolvedWithSession(PP_Instance instance,
|
| SerializedVarSendInput(dispatcher(), web_session_id_var)));
|
| }
|
|
|
| +void PPB_Instance_Proxy::PromiseResolvedWithKeyIds(PP_Instance instance,
|
| + uint32 promise_id,
|
| + PP_Var key_ids_var) {
|
| + dispatcher()->Send(new PpapiHostMsg_PPBInstance_PromiseResolvedWithKeyIds(
|
| + API_ID_PPB_INSTANCE,
|
| + instance,
|
| + promise_id,
|
| + SerializedVarSendInput(dispatcher(), key_ids_var)));
|
| +}
|
| +
|
| void PPB_Instance_Proxy::PromiseRejected(PP_Instance instance,
|
| uint32 promise_id,
|
| PP_CdmExceptionCode exception_code,
|
| @@ -603,6 +619,26 @@ void PPB_Instance_Proxy::SessionMessage(PP_Instance instance,
|
| SerializedVarSendInput(dispatcher(), destination_url_var)));
|
| }
|
|
|
| +void PPB_Instance_Proxy::SessionKeysChange(PP_Instance instance,
|
| + PP_Var web_session_id_var,
|
| + PP_Bool has_additional_usable_key) {
|
| + dispatcher()->Send(new PpapiHostMsg_PPBInstance_SessionKeysChange(
|
| + API_ID_PPB_INSTANCE,
|
| + instance,
|
| + SerializedVarSendInput(dispatcher(), web_session_id_var),
|
| + has_additional_usable_key));
|
| +}
|
| +
|
| +void PPB_Instance_Proxy::SessionExpirationChange(PP_Instance instance,
|
| + PP_Var web_session_id_var,
|
| + PP_Time new_expiry_time) {
|
| + dispatcher()->Send(new PpapiHostMsg_PPBInstance_SessionExpirationChange(
|
| + API_ID_PPB_INSTANCE,
|
| + instance,
|
| + SerializedVarSendInput(dispatcher(), web_session_id_var),
|
| + new_expiry_time));
|
| +}
|
| +
|
| void PPB_Instance_Proxy::SessionReady(PP_Instance instance,
|
| PP_Var web_session_id_var) {
|
| dispatcher()->Send(new PpapiHostMsg_PPBInstance_SessionReady(
|
| @@ -1198,6 +1234,19 @@ void PPB_Instance_Proxy::OnHostMsgPromiseResolvedWithSession(
|
| }
|
| }
|
|
|
| +void PPB_Instance_Proxy::OnHostMsgPromiseResolvedWithKeyIds(
|
| + PP_Instance instance,
|
| + uint32_t promise_id,
|
| + SerializedVarReceiveInput key_ids) {
|
| + if (!dispatcher()->permissions().HasPermission(PERMISSION_PRIVATE))
|
| + return;
|
| + EnterInstanceNoLock enter(instance);
|
| + if (enter.succeeded()) {
|
| + enter.functions()->PromiseResolvedWithKeyIds(
|
| + instance, promise_id, key_ids.Get(dispatcher()));
|
| + }
|
| +}
|
| +
|
| void PPB_Instance_Proxy::OnHostMsgPromiseRejected(
|
| PP_Instance instance,
|
| uint32_t promise_id,
|
| @@ -1232,6 +1281,32 @@ void PPB_Instance_Proxy::OnHostMsgSessionMessage(
|
| }
|
| }
|
|
|
| +void PPB_Instance_Proxy::OnHostMsgSessionKeysChange(
|
| + PP_Instance instance,
|
| + SerializedVarReceiveInput web_session_id,
|
| + PP_Bool has_additional_usable_key) {
|
| + if (!dispatcher()->permissions().HasPermission(PERMISSION_PRIVATE))
|
| + return;
|
| + EnterInstanceNoLock enter(instance);
|
| + if (enter.succeeded()) {
|
| + enter.functions()->SessionKeysChange(
|
| + instance, web_session_id.Get(dispatcher()), has_additional_usable_key);
|
| + }
|
| +}
|
| +
|
| +void PPB_Instance_Proxy::OnHostMsgSessionExpirationChange(
|
| + PP_Instance instance,
|
| + SerializedVarReceiveInput web_session_id,
|
| + PP_Time new_expiry_time) {
|
| + if (!dispatcher()->permissions().HasPermission(PERMISSION_PRIVATE))
|
| + return;
|
| + EnterInstanceNoLock enter(instance);
|
| + if (enter.succeeded()) {
|
| + enter.functions()->SessionExpirationChange(
|
| + instance, web_session_id.Get(dispatcher()), new_expiry_time);
|
| + }
|
| +}
|
| +
|
| void PPB_Instance_Proxy::OnHostMsgSessionReady(
|
| PP_Instance instance,
|
| SerializedVarReceiveInput web_session_id) {
|
|
|