Chromium Code Reviews| Index: ppapi/proxy/ppb_instance_proxy.cc |
| diff --git a/ppapi/proxy/ppb_instance_proxy.cc b/ppapi/proxy/ppb_instance_proxy.cc |
| index ea974ef29db254c7426ca35a6f99d264e49bf7f0..2f2658068c6cd64ee331d1071d1ae91a02ab9a8c 100644 |
| --- a/ppapi/proxy/ppb_instance_proxy.cc |
| +++ b/ppapi/proxy/ppb_instance_proxy.cc |
| @@ -136,6 +136,21 @@ bool PPB_Instance_Proxy::OnMessageReceived(const IPC::Message& msg) { |
| OnHostMsgCancelCompositionText) |
| IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_UpdateSurroundingText, |
| OnHostMsgUpdateSurroundingText) |
| + IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_NeedKey, |
| + OnHostMsgNeedKey) |
| + IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_KeyAdded, |
| + OnHostMsgKeyAdded) |
| + IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_KeyMessage, |
| + OnHostMsgKeyMessage) |
| + IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_KeyError, |
| + OnHostMsgKeyError) |
| + IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_DeliverBlock, |
| + OnHostMsgDeliverBlock) |
| + IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_DeliverFrame, |
| + OnHostMsgDeliverFrame) |
| + IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_DeliverSamples, |
| + OnHostMsgDeliverSamples) |
| + |
| #if !defined(OS_NACL) |
| IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_ResolveRelativeToDocument, |
| OnHostMsgResolveRelativeToDocument) |
| @@ -530,6 +545,91 @@ void PPB_Instance_Proxy::OnHostMsgGetOwnerElementObject( |
| } |
| } |
| +void PPB_Instance_Proxy::NeedKey(PP_Instance instance, |
| + PP_Var key_system, |
| + PP_Var session_id, |
| + PP_Var init_data) { |
| + dispatcher()->Send( |
| + new PpapiHostMsg_PPBInstance_NeedKey( |
| + API_ID_PPB_INSTANCE, |
| + instance, |
| + SerializedVarSendInput(dispatcher(), key_system), |
| + SerializedVarSendInput(dispatcher(), session_id), |
| + SerializedVarSendInput(dispatcher(), init_data))); |
| +} |
| + |
| +void PPB_Instance_Proxy::KeyAdded(PP_Instance instance, |
| + PP_Var key_system, |
| + PP_Var session_id) { |
| + dispatcher()->Send( |
| + new PpapiHostMsg_PPBInstance_KeyAdded( |
| + API_ID_PPB_INSTANCE, |
| + instance, |
| + SerializedVarSendInput(dispatcher(), key_system), |
| + SerializedVarSendInput(dispatcher(), session_id))); |
| +} |
| + |
| +void PPB_Instance_Proxy::KeyMessage(PP_Instance instance, |
| + PP_Var key_system, |
| + PP_Var session_id, |
| + PP_Resource message, |
|
dmichael (off chromium)
2012/08/08 22:24:02
In this direction, I think you need to look the PP
Tom Finegan
2012/08/09 22:45:17
Done.
|
| + PP_Var default_url) { |
| + dispatcher()->Send( |
| + new PpapiHostMsg_PPBInstance_KeyMessage( |
| + API_ID_PPB_INSTANCE, |
| + instance, |
| + SerializedVarSendInput(dispatcher(), key_system), |
| + SerializedVarSendInput(dispatcher(), session_id), |
| + message, |
| + SerializedVarSendInput(dispatcher(), default_url))); |
| +} |
| + |
| +void PPB_Instance_Proxy::KeyError(PP_Instance instance, |
| + PP_Var key_system, |
| + PP_Var session_id, |
| + int32_t media_error, |
| + int32_t system_error) { |
| + dispatcher()->Send( |
| + new PpapiHostMsg_PPBInstance_KeyError( |
| + API_ID_PPB_INSTANCE, |
| + instance, |
| + SerializedVarSendInput(dispatcher(), key_system), |
| + SerializedVarSendInput(dispatcher(), session_id), |
| + media_error, |
| + system_error)); |
| +} |
| + |
| +void PPB_Instance_Proxy::DeliverBlock(PP_Instance instance, |
| + PP_Resource decrypted_block, |
| + uint64_t request_id) { |
| + dispatcher()->Send( |
| + new PpapiHostMsg_PPBInstance_DeliverBlock(API_ID_PPB_INSTANCE, |
| + instance, |
| + decrypted_block, |
| + request_id)); |
| +} |
| + |
| +void PPB_Instance_Proxy::DeliverFrame(PP_Instance instance, |
| + PP_Resource decrypted_frame, |
| + uint64_t request_id) { |
| + dispatcher()->Send( |
| + new PpapiHostMsg_PPBInstance_DeliverFrame(API_ID_PPB_INSTANCE, |
| + instance, |
| + decrypted_frame, |
| + request_id)); |
| +} |
| + |
| +void PPB_Instance_Proxy::DeliverSamples(PP_Instance instance, |
| + PP_Resource decrypted_samples, |
| + uint64_t request_id) { |
| + dispatcher()->Send( |
| + new PpapiHostMsg_PPBInstance_DeliverSamples(API_ID_PPB_INSTANCE, |
| + instance, |
| + decrypted_samples, |
| + request_id)); |
| +} |
| + |
| + |
| void PPB_Instance_Proxy::OnHostMsgBindGraphics(PP_Instance instance, |
| const HostResource& device, |
| PP_Bool* result) { |
| @@ -779,6 +879,87 @@ void PPB_Instance_Proxy::OnHostMsgUpdateSurroundingText( |
| } |
| } |
| +void PPB_Instance_Proxy::OnHostMsgNeedKey(PP_Instance instance, |
| + SerializedVarReceiveInput key_system, |
| + SerializedVarReceiveInput session_id, |
| + SerializedVarReceiveInput init_data) { |
| + EnterInstanceNoLock enter(instance); |
| + if (enter.succeeded()) { |
| + enter.functions()->NeedKey(instance, |
| + key_system.Get(dispatcher()), |
| + session_id.Get(dispatcher()), |
| + init_data.Get(dispatcher())); |
| + } |
| +} |
| + |
| +void PPB_Instance_Proxy::OnHostMsgKeyAdded( |
| + PP_Instance instance, |
| + SerializedVarReceiveInput key_system, |
| + SerializedVarReceiveInput session_id) { |
| + EnterInstanceNoLock enter(instance); |
| + if (enter.succeeded()) { |
| + enter.functions()->KeyAdded(instance, |
| + key_system.Get(dispatcher()), |
| + session_id.Get(dispatcher())); |
| + } |
| +} |
| + |
| +void PPB_Instance_Proxy::OnHostMsgKeyMessage( |
| + PP_Instance instance, |
| + SerializedVarReceiveInput key_system, |
| + SerializedVarReceiveInput session_id, |
| + PP_Resource message, |
| + SerializedVarReceiveInput default_url) { |
| + EnterInstanceNoLock enter(instance); |
| + if (enter.succeeded()) { |
| + enter.functions()->KeyMessage(instance, |
| + key_system.Get(dispatcher()), |
| + session_id.Get(dispatcher()), |
| + message, |
| + default_url.Get(dispatcher())); |
| + } |
| +} |
| + |
| +void PPB_Instance_Proxy::OnHostMsgKeyError( |
| + PP_Instance instance, |
| + SerializedVarReceiveInput key_system, |
| + SerializedVarReceiveInput session_id, |
| + int32_t media_error, |
| + int32_t system_error) { |
| + EnterInstanceNoLock enter(instance); |
| + if (enter.succeeded()) { |
| + enter.functions()->KeyError(instance, |
| + key_system.Get(dispatcher()), |
| + session_id.Get(dispatcher()), |
| + media_error, |
| + system_error); |
| + } |
| +} |
| + |
| +void PPB_Instance_Proxy::OnHostMsgDeliverBlock(PP_Instance instance, |
| + PP_Resource decrypted_block, |
| + uint64_t request_id) { |
| + EnterInstanceNoLock enter(instance); |
| + if (enter.succeeded()) |
| + enter.functions()->DeliverBlock(instance, decrypted_block, request_id); |
| +} |
| + |
| +void PPB_Instance_Proxy::OnHostMsgDeliverFrame(PP_Instance instance, |
| + PP_Resource decrypted_frame, |
| + uint64_t request_id) { |
| + EnterInstanceNoLock enter(instance); |
| + if (enter.succeeded()) |
| + enter.functions()->DeliverFrame(instance, decrypted_frame, request_id); |
| +} |
| + |
| +void PPB_Instance_Proxy::OnHostMsgDeliverSamples(PP_Instance instance, |
| + PP_Resource decrypted_samples, |
| + uint64_t request_id) { |
| + EnterInstanceNoLock enter(instance); |
| + if (enter.succeeded()) |
| + enter.functions()->DeliverSamples(instance, decrypted_samples, request_id); |
| +} |
| + |
| void PPB_Instance_Proxy::OnPluginMsgMouseLockComplete(PP_Instance instance, |
| int32_t result) { |
| // Save the mouse callback on the instance data. |