diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-06 22:52:40 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-06 22:52:40 +0000 |
commit | 55a5a5252075df867707a521b927e5e24f9090e1 (patch) | |
tree | cb030c4a7ef0d0aa1dfeea5ea16090958c222a9b /ppapi/proxy | |
parent | 3704633a280e1e834ea3959f57841ab718cbe3ec (diff) | |
download | chromium_src-55a5a5252075df867707a521b927e5e24f9090e1.zip chromium_src-55a5a5252075df867707a521b927e5e24f9090e1.tar.gz chromium_src-55a5a5252075df867707a521b927e5e24f9090e1.tar.bz2 |
Move PPB_Zoom and PPB_Messageing to the thunk system. Implement PPB_Messaging
proxy.
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/7283020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91633 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/proxy')
-rw-r--r-- | ppapi/proxy/ppapi_messages.h | 3 | ||||
-rw-r--r-- | ppapi/proxy/ppb_instance_proxy.cc | 32 | ||||
-rw-r--r-- | ppapi/proxy/ppb_instance_proxy.h | 7 |
3 files changed, 42 insertions, 0 deletions
diff --git a/ppapi/proxy/ppapi_messages.h b/ppapi/proxy/ppapi_messages.h index 75f79ac..faba350 100644 --- a/ppapi/proxy/ppapi_messages.h +++ b/ppapi/proxy/ppapi_messages.h @@ -625,6 +625,9 @@ IPC_SYNC_MESSAGE_ROUTED1_2(PpapiHostMsg_PPBInstance_GetScreenSize, PP_Instance /* instance */, PP_Bool /* result */, PP_Size /* size */) +IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBInstance_PostMessage, + PP_Instance /* instance */, + pp::proxy::SerializedVar /* message */) IPC_SYNC_MESSAGE_ROUTED3_1( PpapiHostMsg_PPBPDF_GetFontFileWithFallback, diff --git a/ppapi/proxy/ppb_instance_proxy.cc b/ppapi/proxy/ppb_instance_proxy.cc index af12d28..98ae45d 100644 --- a/ppapi/proxy/ppb_instance_proxy.cc +++ b/ppapi/proxy/ppb_instance_proxy.cc @@ -16,6 +16,11 @@ #include "ppapi/thunk/enter.h" #include "ppapi/thunk/thunk.h" +// Windows headers interfere with this file. +#ifdef PostMessage +#undef PostMessage +#endif + using ppapi::thunk::EnterFunctionNoLock; using ppapi::thunk::EnterResourceNoLock; using ppapi::thunk::PPB_Instance_FunctionAPI; @@ -193,6 +198,26 @@ PP_Bool PPB_Instance_Proxy::GetScreenSize(PP_Instance instance, return result; } +void PPB_Instance_Proxy::ZoomChanged(PP_Instance instance, + double factor) { + // Not proxied yet. + NOTIMPLEMENTED(); +} + +void PPB_Instance_Proxy::ZoomLimitsChanged(PP_Instance instance, + double minimum_factor, + double maximium_factor) { + // Not proxied yet. + NOTIMPLEMENTED(); +} + +void PPB_Instance_Proxy::PostMessage(PP_Instance instance, + PP_Var message) { + dispatcher()->Send(new PpapiHostMsg_PPBInstance_PostMessage( + INTERFACE_ID_PPB_INSTANCE, + instance, SerializedVarSendInput(dispatcher(), message))); +} + void PPB_Instance_Proxy::OnMsgGetWindowObject( PP_Instance instance, SerializedVarReturnValue result) { @@ -264,5 +289,12 @@ void PPB_Instance_Proxy::OnMsgGetScreenSize(PP_Instance instance, *result = enter.functions()->GetScreenSize(instance, size); } +void PPB_Instance_Proxy::OnMsgPostMessage(PP_Instance instance, + SerializedVarReceiveInput message) { + EnterFunctionNoLock<PPB_Instance_FunctionAPI> enter(instance, false); + if (enter.succeeded()) + enter.functions()->PostMessage(instance, message.Get(dispatcher())); +} + } // namespace proxy } // namespace pp diff --git a/ppapi/proxy/ppb_instance_proxy.h b/ppapi/proxy/ppb_instance_proxy.h index b765279..1a719ea6 100644 --- a/ppapi/proxy/ppb_instance_proxy.h +++ b/ppapi/proxy/ppb_instance_proxy.h @@ -51,6 +51,11 @@ class PPB_Instance_Proxy : public InterfaceProxy, virtual PP_Bool SetFullscreen(PP_Instance instance, PP_Bool fullscreen) OVERRIDE; virtual PP_Bool GetScreenSize(PP_Instance instance, PP_Size* size) OVERRIDE; + virtual void ZoomChanged(PP_Instance instance, double factor) OVERRIDE; + virtual void ZoomLimitsChanged(PP_Instance instance, + double minimum_factor, + double maximium_factor) OVERRIDE; + virtual void PostMessage(PP_Instance instance, PP_Var message) OVERRIDE; private: // Message handlers. @@ -72,6 +77,8 @@ class PPB_Instance_Proxy : public InterfaceProxy, void OnMsgGetScreenSize(PP_Instance instance, PP_Bool* result, PP_Size* size); + void OnMsgPostMessage(PP_Instance instance, + SerializedVarReceiveInput message); }; } // namespace proxy |