[email protected] | f24448db | 2011-01-27 20:40:39 | [diff] [blame] | 1 | // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
[email protected] | 4c2e935 | 2010-11-05 22:13:02 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #include "ppapi/proxy/ppb_instance_proxy.h" |
| 6 | |
[email protected] | ceadc39 | 2011-06-15 23:04:24 | [diff] [blame] | 7 | #include "ppapi/c/dev/ppb_fullscreen_dev.h" |
[email protected] | 4c2e935 | 2010-11-05 22:13:02 | [diff] [blame] | 8 | #include "ppapi/c/pp_var.h" |
| 9 | #include "ppapi/c/ppb_instance.h" |
[email protected] | 7f801d8 | 2011-07-08 23:30:11 | [diff] [blame] | 10 | #include "ppapi/c/ppb_messaging.h" |
[email protected] | 037f63f | 2011-03-13 19:44:46 | [diff] [blame] | 11 | #include "ppapi/proxy/host_dispatcher.h" |
[email protected] | 4c2e935 | 2010-11-05 22:13:02 | [diff] [blame] | 12 | #include "ppapi/proxy/plugin_dispatcher.h" |
[email protected] | f24448db | 2011-01-27 20:40:39 | [diff] [blame] | 13 | #include "ppapi/proxy/plugin_resource.h" |
| 14 | #include "ppapi/proxy/plugin_resource_tracker.h" |
[email protected] | 4c2e935 | 2010-11-05 22:13:02 | [diff] [blame] | 15 | #include "ppapi/proxy/ppapi_messages.h" |
| 16 | #include "ppapi/proxy/serialized_var.h" |
[email protected] | ceadc39 | 2011-06-15 23:04:24 | [diff] [blame] | 17 | #include "ppapi/thunk/enter.h" |
| 18 | #include "ppapi/thunk/thunk.h" |
| 19 | |
[email protected] | 55a5a52 | 2011-07-06 22:52:40 | [diff] [blame] | 20 | // Windows headers interfere with this file. |
| 21 | #ifdef PostMessage |
| 22 | #undef PostMessage |
| 23 | #endif |
| 24 | |
[email protected] | be0a84b | 2011-08-13 04:18:44 | [diff] [blame] | 25 | using ppapi::HostResource; |
[email protected] | ceadc39 | 2011-06-15 23:04:24 | [diff] [blame] | 26 | using ppapi::thunk::EnterFunctionNoLock; |
| 27 | using ppapi::thunk::EnterResourceNoLock; |
| 28 | using ppapi::thunk::PPB_Instance_FunctionAPI; |
[email protected] | 4c2e935 | 2010-11-05 22:13:02 | [diff] [blame] | 29 | |
| 30 | namespace pp { |
| 31 | namespace proxy { |
| 32 | |
| 33 | namespace { |
| 34 | |
[email protected] | 465faa2 | 2011-02-08 16:31:46 | [diff] [blame] | 35 | InterfaceProxy* CreateInstanceProxy(Dispatcher* dispatcher, |
| 36 | const void* target_interface) { |
| 37 | return new PPB_Instance_Proxy(dispatcher, target_interface); |
| 38 | } |
| 39 | |
[email protected] | 4c2e935 | 2010-11-05 22:13:02 | [diff] [blame] | 40 | } // namespace |
| 41 | |
| 42 | PPB_Instance_Proxy::PPB_Instance_Proxy(Dispatcher* dispatcher, |
| 43 | const void* target_interface) |
| 44 | : InterfaceProxy(dispatcher, target_interface) { |
| 45 | } |
| 46 | |
| 47 | PPB_Instance_Proxy::~PPB_Instance_Proxy() { |
| 48 | } |
| 49 | |
[email protected] | 465faa2 | 2011-02-08 16:31:46 | [diff] [blame] | 50 | // static |
[email protected] | ceadc39 | 2011-06-15 23:04:24 | [diff] [blame] | 51 | const InterfaceProxy::Info* PPB_Instance_Proxy::GetInfo0_5() { |
| 52 | static const Info info = { |
[email protected] | 7d0284e0 | 2011-07-13 03:48:24 | [diff] [blame] | 53 | ppapi::thunk::GetPPB_Instance_1_0_Thunk(), |
[email protected] | ceadc39 | 2011-06-15 23:04:24 | [diff] [blame] | 54 | PPB_INSTANCE_INTERFACE_0_5, |
[email protected] | 7d0284e0 | 2011-07-13 03:48:24 | [diff] [blame] | 55 | INTERFACE_ID_NONE, // 1_0 is the canonical one. |
| 56 | false, |
| 57 | &CreateInstanceProxy, |
| 58 | }; |
| 59 | return &info; |
| 60 | } |
| 61 | |
| 62 | // static |
| 63 | const InterfaceProxy::Info* PPB_Instance_Proxy::GetInfo1_0() { |
| 64 | static const Info info = { |
| 65 | ppapi::thunk::GetPPB_Instance_1_0_Thunk(), |
| 66 | PPB_INSTANCE_INTERFACE_1_0, |
[email protected] | 465faa2 | 2011-02-08 16:31:46 | [diff] [blame] | 67 | INTERFACE_ID_PPB_INSTANCE, |
| 68 | false, |
| 69 | &CreateInstanceProxy, |
| 70 | }; |
| 71 | return &info; |
[email protected] | 4c2e935 | 2010-11-05 22:13:02 | [diff] [blame] | 72 | } |
| 73 | |
[email protected] | ceadc39 | 2011-06-15 23:04:24 | [diff] [blame] | 74 | // static |
[email protected] | 7f801d8 | 2011-07-08 23:30:11 | [diff] [blame] | 75 | const InterfaceProxy::Info* PPB_Instance_Proxy::GetInfoMessaging() { |
| 76 | static const Info info = { |
| 77 | ppapi::thunk::GetPPB_Messaging_Thunk(), |
| 78 | PPB_MESSAGING_INTERFACE, |
[email protected] | 657f4ef | 2011-07-14 16:39:23 | [diff] [blame] | 79 | INTERFACE_ID_NONE, // 1_0 is the canonical one. |
[email protected] | 7f801d8 | 2011-07-08 23:30:11 | [diff] [blame] | 80 | false, |
| 81 | &CreateInstanceProxy, |
| 82 | }; |
| 83 | return &info; |
| 84 | } |
| 85 | |
| 86 | // static |
[email protected] | ceadc39 | 2011-06-15 23:04:24 | [diff] [blame] | 87 | const InterfaceProxy::Info* PPB_Instance_Proxy::GetInfoPrivate() { |
| 88 | static const Info info = { |
| 89 | ppapi::thunk::GetPPB_Instance_Private_Thunk(), |
| 90 | PPB_INSTANCE_PRIVATE_INTERFACE, |
[email protected] | 657f4ef | 2011-07-14 16:39:23 | [diff] [blame] | 91 | INTERFACE_ID_NONE, // 1_0 is the canonical one. |
[email protected] | ceadc39 | 2011-06-15 23:04:24 | [diff] [blame] | 92 | false, |
| 93 | &CreateInstanceProxy, |
| 94 | }; |
| 95 | return &info; |
| 96 | } |
| 97 | |
| 98 | // static |
| 99 | const InterfaceProxy::Info* PPB_Instance_Proxy::GetInfoFullscreen() { |
| 100 | static const Info info = { |
| 101 | ppapi::thunk::GetPPB_Fullscreen_Thunk(), |
| 102 | PPB_FULLSCREEN_DEV_INTERFACE, |
[email protected] | 657f4ef | 2011-07-14 16:39:23 | [diff] [blame] | 103 | INTERFACE_ID_NONE, // 1_0 is the canonical one. |
[email protected] | ceadc39 | 2011-06-15 23:04:24 | [diff] [blame] | 104 | false, |
| 105 | &CreateInstanceProxy, |
| 106 | }; |
| 107 | return &info; |
| 108 | } |
| 109 | |
[email protected] | a95986a8 | 2010-12-24 06:19:28 | [diff] [blame] | 110 | bool PPB_Instance_Proxy::OnMessageReceived(const IPC::Message& msg) { |
[email protected] | 3502a9969 | 2011-04-18 20:51:18 | [diff] [blame] | 111 | // Prevent the dispatcher from going away during a call to ExecuteScript. |
| 112 | // This must happen OUTSIDE of ExecuteScript since the SerializedVars use |
| 113 | // the dispatcher upon return of the function (converting the |
| 114 | // SerializedVarReturnValue/OutParam to a SerializedVar in the destructor). |
| 115 | ScopedModuleReference death_grip(dispatcher()); |
| 116 | |
[email protected] | a95986a8 | 2010-12-24 06:19:28 | [diff] [blame] | 117 | bool handled = true; |
[email protected] | 4c2e935 | 2010-11-05 22:13:02 | [diff] [blame] | 118 | IPC_BEGIN_MESSAGE_MAP(PPB_Instance_Proxy, msg) |
| 119 | IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_GetWindowObject, |
| 120 | OnMsgGetWindowObject) |
| 121 | IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_GetOwnerElementObject, |
| 122 | OnMsgGetOwnerElementObject) |
| 123 | IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_BindGraphics, |
| 124 | OnMsgBindGraphics) |
| 125 | IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_IsFullFrame, |
| 126 | OnMsgIsFullFrame) |
| 127 | IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_ExecuteScript, |
| 128 | OnMsgExecuteScript) |
[email protected] | 7f801d8 | 2011-07-08 23:30:11 | [diff] [blame] | 129 | IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_PostMessage, |
| 130 | OnMsgPostMessage) |
[email protected] | ceadc39 | 2011-06-15 23:04:24 | [diff] [blame] | 131 | IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_SetFullscreen, |
| 132 | OnMsgSetFullscreen) |
| 133 | IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_GetScreenSize, |
| 134 | OnMsgGetScreenSize) |
[email protected] | 493d1421 | 2011-07-07 15:38:48 | [diff] [blame] | 135 | IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_RequestInputEvents, |
| 136 | OnMsgRequestInputEvents) |
| 137 | IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_ClearInputEvents, |
| 138 | OnMsgClearInputEvents) |
[email protected] | a95986a8 | 2010-12-24 06:19:28 | [diff] [blame] | 139 | IPC_MESSAGE_UNHANDLED(handled = false) |
[email protected] | 4c2e935 | 2010-11-05 22:13:02 | [diff] [blame] | 140 | IPC_END_MESSAGE_MAP() |
[email protected] | a95986a8 | 2010-12-24 06:19:28 | [diff] [blame] | 141 | return handled; |
[email protected] | 4c2e935 | 2010-11-05 22:13:02 | [diff] [blame] | 142 | } |
| 143 | |
[email protected] | ceadc39 | 2011-06-15 23:04:24 | [diff] [blame] | 144 | PPB_Instance_FunctionAPI* PPB_Instance_Proxy::AsPPB_Instance_FunctionAPI() { |
| 145 | return this; |
| 146 | } |
| 147 | |
| 148 | PP_Bool PPB_Instance_Proxy::BindGraphics(PP_Instance instance, |
| 149 | PP_Resource device) { |
| 150 | PluginResource* object = |
| 151 | PluginResourceTracker::GetInstance()->GetResourceObject(device); |
| 152 | if (!object || object->instance() != instance) |
| 153 | return PP_FALSE; |
| 154 | |
| 155 | PP_Bool result = PP_FALSE; |
| 156 | dispatcher()->Send(new PpapiHostMsg_PPBInstance_BindGraphics( |
| 157 | INTERFACE_ID_PPB_INSTANCE, instance, object->host_resource(), |
| 158 | &result)); |
| 159 | return result; |
| 160 | } |
| 161 | |
| 162 | PP_Bool PPB_Instance_Proxy::IsFullFrame(PP_Instance instance) { |
| 163 | PP_Bool result = PP_FALSE; |
| 164 | dispatcher()->Send(new PpapiHostMsg_PPBInstance_IsFullFrame( |
| 165 | INTERFACE_ID_PPB_INSTANCE, instance, &result)); |
| 166 | return result; |
| 167 | } |
| 168 | |
| 169 | PP_Var PPB_Instance_Proxy::GetWindowObject(PP_Instance instance) { |
| 170 | ReceiveSerializedVarReturnValue result; |
| 171 | dispatcher()->Send(new PpapiHostMsg_PPBInstance_GetWindowObject( |
| 172 | INTERFACE_ID_PPB_INSTANCE, instance, &result)); |
| 173 | return result.Return(dispatcher()); |
| 174 | } |
| 175 | |
| 176 | PP_Var PPB_Instance_Proxy::GetOwnerElementObject(PP_Instance instance) { |
| 177 | ReceiveSerializedVarReturnValue result; |
| 178 | dispatcher()->Send(new PpapiHostMsg_PPBInstance_GetOwnerElementObject( |
| 179 | INTERFACE_ID_PPB_INSTANCE, instance, &result)); |
| 180 | return result.Return(dispatcher()); |
| 181 | } |
| 182 | |
| 183 | PP_Var PPB_Instance_Proxy::ExecuteScript(PP_Instance instance, |
| 184 | PP_Var script, |
| 185 | PP_Var* exception) { |
| 186 | ReceiveSerializedException se(dispatcher(), exception); |
| 187 | if (se.IsThrown()) |
| 188 | return PP_MakeUndefined(); |
| 189 | |
| 190 | ReceiveSerializedVarReturnValue result; |
| 191 | dispatcher()->Send(new PpapiHostMsg_PPBInstance_ExecuteScript( |
| 192 | INTERFACE_ID_PPB_INSTANCE, instance, |
| 193 | SerializedVarSendInput(dispatcher(), script), &se, &result)); |
| 194 | return result.Return(dispatcher()); |
| 195 | } |
| 196 | |
| 197 | PP_Bool PPB_Instance_Proxy::IsFullscreen(PP_Instance instance) { |
| 198 | InstanceData* data = static_cast<PluginDispatcher*>(dispatcher())-> |
| 199 | GetInstanceData(instance); |
| 200 | if (!data) |
| 201 | return PP_FALSE; |
| 202 | return data->fullscreen; |
| 203 | } |
| 204 | |
| 205 | PP_Bool PPB_Instance_Proxy::SetFullscreen(PP_Instance instance, |
| 206 | PP_Bool fullscreen) { |
| 207 | PP_Bool result = PP_FALSE; |
| 208 | dispatcher()->Send(new PpapiHostMsg_PPBInstance_SetFullscreen( |
| 209 | INTERFACE_ID_PPB_INSTANCE, instance, fullscreen, &result)); |
| 210 | return result; |
| 211 | } |
| 212 | |
| 213 | PP_Bool PPB_Instance_Proxy::GetScreenSize(PP_Instance instance, |
| 214 | PP_Size* size) { |
| 215 | PP_Bool result = PP_FALSE; |
| 216 | dispatcher()->Send(new PpapiHostMsg_PPBInstance_GetScreenSize( |
| 217 | INTERFACE_ID_PPB_INSTANCE, instance, &result, size)); |
| 218 | return result; |
| 219 | } |
| 220 | |
[email protected] | 493d1421 | 2011-07-07 15:38:48 | [diff] [blame] | 221 | int32_t PPB_Instance_Proxy::RequestInputEvents(PP_Instance instance, |
| 222 | uint32_t event_classes) { |
| 223 | dispatcher()->Send(new PpapiHostMsg_PPBInstance_RequestInputEvents( |
| 224 | INTERFACE_ID_PPB_INSTANCE, instance, false, event_classes)); |
| 225 | |
| 226 | // We always register for the classes we can handle, this function validates |
| 227 | // the flags so we can notify it if anything was invalid, without requiring |
| 228 | // a sync reply. |
| 229 | return ValidateRequestInputEvents(false, event_classes); |
| 230 | } |
| 231 | |
| 232 | int32_t PPB_Instance_Proxy::RequestFilteringInputEvents( |
| 233 | PP_Instance instance, |
| 234 | uint32_t event_classes) { |
| 235 | dispatcher()->Send(new PpapiHostMsg_PPBInstance_RequestInputEvents( |
| 236 | INTERFACE_ID_PPB_INSTANCE, instance, true, event_classes)); |
| 237 | |
| 238 | // We always register for the classes we can handle, this function validates |
| 239 | // the flags so we can notify it if anything was invalid, without requiring |
| 240 | // a sync reply. |
| 241 | return ValidateRequestInputEvents(true, event_classes); |
| 242 | } |
| 243 | |
| 244 | void PPB_Instance_Proxy::ClearInputEventRequest(PP_Instance instance, |
| 245 | uint32_t event_classes) { |
| 246 | dispatcher()->Send(new PpapiHostMsg_PPBInstance_ClearInputEvents( |
| 247 | INTERFACE_ID_PPB_INSTANCE, instance, event_classes)); |
| 248 | } |
| 249 | |
[email protected] | 55a5a52 | 2011-07-06 22:52:40 | [diff] [blame] | 250 | void PPB_Instance_Proxy::ZoomChanged(PP_Instance instance, |
| 251 | double factor) { |
| 252 | // Not proxied yet. |
| 253 | NOTIMPLEMENTED(); |
| 254 | } |
| 255 | |
| 256 | void PPB_Instance_Proxy::ZoomLimitsChanged(PP_Instance instance, |
| 257 | double minimum_factor, |
| 258 | double maximium_factor) { |
| 259 | // Not proxied yet. |
| 260 | NOTIMPLEMENTED(); |
| 261 | } |
| 262 | |
[email protected] | 1523794 | 2011-07-30 04:24:19 | [diff] [blame] | 263 | void PPB_Instance_Proxy::SubscribeToPolicyUpdates(PP_Instance instance) { |
| 264 | // Not proxied yet. |
| 265 | NOTIMPLEMENTED(); |
| 266 | } |
| 267 | |
[email protected] | 55a5a52 | 2011-07-06 22:52:40 | [diff] [blame] | 268 | void PPB_Instance_Proxy::PostMessage(PP_Instance instance, |
| 269 | PP_Var message) { |
| 270 | dispatcher()->Send(new PpapiHostMsg_PPBInstance_PostMessage( |
| 271 | INTERFACE_ID_PPB_INSTANCE, |
| 272 | instance, SerializedVarSendInput(dispatcher(), message))); |
| 273 | } |
| 274 | |
[email protected] | 4c2e935 | 2010-11-05 22:13:02 | [diff] [blame] | 275 | void PPB_Instance_Proxy::OnMsgGetWindowObject( |
| 276 | PP_Instance instance, |
| 277 | SerializedVarReturnValue result) { |
[email protected] | ceadc39 | 2011-06-15 23:04:24 | [diff] [blame] | 278 | EnterFunctionNoLock<PPB_Instance_FunctionAPI> enter(instance, false); |
| 279 | if (enter.succeeded()) |
| 280 | result.Return(dispatcher(), enter.functions()->GetWindowObject(instance)); |
[email protected] | 4c2e935 | 2010-11-05 22:13:02 | [diff] [blame] | 281 | } |
| 282 | |
| 283 | void PPB_Instance_Proxy::OnMsgGetOwnerElementObject( |
| 284 | PP_Instance instance, |
| 285 | SerializedVarReturnValue result) { |
[email protected] | ceadc39 | 2011-06-15 23:04:24 | [diff] [blame] | 286 | EnterFunctionNoLock<PPB_Instance_FunctionAPI> enter(instance, false); |
| 287 | if (enter.succeeded()) { |
| 288 | result.Return(dispatcher(), |
| 289 | enter.functions()->GetOwnerElementObject(instance)); |
| 290 | } |
[email protected] | 4c2e935 | 2010-11-05 22:13:02 | [diff] [blame] | 291 | } |
| 292 | |
| 293 | void PPB_Instance_Proxy::OnMsgBindGraphics(PP_Instance instance, |
[email protected] | be0a84b | 2011-08-13 04:18:44 | [diff] [blame] | 294 | const HostResource& device, |
[email protected] | 19d2b01 | 2010-11-08 16:32:18 | [diff] [blame] | 295 | PP_Bool* result) { |
[email protected] | ceadc39 | 2011-06-15 23:04:24 | [diff] [blame] | 296 | EnterFunctionNoLock<PPB_Instance_FunctionAPI> enter(instance, false); |
| 297 | if (enter.succeeded()) { |
| 298 | *result = enter.functions()->BindGraphics(instance, |
| 299 | device.host_resource()); |
| 300 | } |
[email protected] | 4c2e935 | 2010-11-05 22:13:02 | [diff] [blame] | 301 | } |
| 302 | |
[email protected] | 19d2b01 | 2010-11-08 16:32:18 | [diff] [blame] | 303 | void PPB_Instance_Proxy::OnMsgIsFullFrame(PP_Instance instance, |
| 304 | PP_Bool* result) { |
[email protected] | ceadc39 | 2011-06-15 23:04:24 | [diff] [blame] | 305 | EnterFunctionNoLock<PPB_Instance_FunctionAPI> enter(instance, false); |
| 306 | if (enter.succeeded()) |
| 307 | *result = enter.functions()->IsFullFrame(instance); |
[email protected] | 4c2e935 | 2010-11-05 22:13:02 | [diff] [blame] | 308 | } |
| 309 | |
| 310 | void PPB_Instance_Proxy::OnMsgExecuteScript( |
| 311 | PP_Instance instance, |
| 312 | SerializedVarReceiveInput script, |
| 313 | SerializedVarOutParam out_exception, |
| 314 | SerializedVarReturnValue result) { |
[email protected] | ceadc39 | 2011-06-15 23:04:24 | [diff] [blame] | 315 | EnterFunctionNoLock<PPB_Instance_FunctionAPI> enter(instance, false); |
| 316 | if (enter.failed()) |
| 317 | return; |
| 318 | |
[email protected] | 037f63f | 2011-03-13 19:44:46 | [diff] [blame] | 319 | if (dispatcher()->IsPlugin()) |
| 320 | NOTREACHED(); |
| 321 | else |
| 322 | static_cast<HostDispatcher*>(dispatcher())->set_allow_plugin_reentrancy(); |
| 323 | |
[email protected] | ceadc39 | 2011-06-15 23:04:24 | [diff] [blame] | 324 | result.Return(dispatcher(), enter.functions()->ExecuteScript( |
[email protected] | 4c2e935 | 2010-11-05 22:13:02 | [diff] [blame] | 325 | instance, |
| 326 | script.Get(dispatcher()), |
| 327 | out_exception.OutParam(dispatcher()))); |
| 328 | } |
| 329 | |
[email protected] | ceadc39 | 2011-06-15 23:04:24 | [diff] [blame] | 330 | void PPB_Instance_Proxy::OnMsgSetFullscreen(PP_Instance instance, |
| 331 | PP_Bool fullscreen, |
| 332 | PP_Bool* result) { |
| 333 | EnterFunctionNoLock<PPB_Instance_FunctionAPI> enter(instance, false); |
| 334 | if (enter.succeeded()) |
| 335 | *result = enter.functions()->SetFullscreen(instance, fullscreen); |
| 336 | } |
| 337 | |
| 338 | void PPB_Instance_Proxy::OnMsgGetScreenSize(PP_Instance instance, |
| 339 | PP_Bool* result, |
| 340 | PP_Size* size) { |
| 341 | EnterFunctionNoLock<PPB_Instance_FunctionAPI> enter(instance, false); |
| 342 | if (enter.succeeded()) |
| 343 | *result = enter.functions()->GetScreenSize(instance, size); |
| 344 | } |
| 345 | |
[email protected] | 493d1421 | 2011-07-07 15:38:48 | [diff] [blame] | 346 | void PPB_Instance_Proxy::OnMsgRequestInputEvents(PP_Instance instance, |
| 347 | bool is_filtering, |
| 348 | uint32_t event_classes) { |
| 349 | EnterFunctionNoLock<PPB_Instance_FunctionAPI> enter(instance, false); |
| 350 | if (enter.succeeded()) { |
| 351 | if (is_filtering) |
| 352 | enter.functions()->RequestFilteringInputEvents(instance, event_classes); |
| 353 | else |
| 354 | enter.functions()->RequestInputEvents(instance, event_classes); |
| 355 | } |
| 356 | } |
| 357 | |
| 358 | void PPB_Instance_Proxy::OnMsgClearInputEvents(PP_Instance instance, |
| 359 | uint32_t event_classes) { |
| 360 | EnterFunctionNoLock<PPB_Instance_FunctionAPI> enter(instance, false); |
| 361 | if (enter.succeeded()) |
| 362 | enter.functions()->ClearInputEventRequest(instance, event_classes); |
| 363 | } |
| 364 | |
[email protected] | 55a5a52 | 2011-07-06 22:52:40 | [diff] [blame] | 365 | void PPB_Instance_Proxy::OnMsgPostMessage(PP_Instance instance, |
| 366 | SerializedVarReceiveInput message) { |
| 367 | EnterFunctionNoLock<PPB_Instance_FunctionAPI> enter(instance, false); |
| 368 | if (enter.succeeded()) |
| 369 | enter.functions()->PostMessage(instance, message.Get(dispatcher())); |
| 370 | } |
| 371 | |
[email protected] | 4c2e935 | 2010-11-05 22:13:02 | [diff] [blame] | 372 | } // namespace proxy |
| 373 | } // namespace pp |