| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ppapi/proxy/ppb_instance_proxy.h" | 5 #include "ppapi/proxy/ppb_instance_proxy.h" |
| 6 | 6 |
| 7 #include "ppapi/c/dev/ppb_fullscreen_dev.h" | 7 #include "ppapi/c/dev/ppb_fullscreen_dev.h" |
| 8 #include "ppapi/c/pp_var.h" | 8 #include "ppapi/c/pp_var.h" |
| 9 #include "ppapi/c/ppb_instance.h" | 9 #include "ppapi/c/ppb_instance.h" |
| 10 #include "ppapi/c/ppb_messaging.h" | |
| 11 #include "ppapi/proxy/host_dispatcher.h" | 10 #include "ppapi/proxy/host_dispatcher.h" |
| 12 #include "ppapi/proxy/plugin_dispatcher.h" | 11 #include "ppapi/proxy/plugin_dispatcher.h" |
| 13 #include "ppapi/proxy/plugin_resource.h" | 12 #include "ppapi/proxy/plugin_resource.h" |
| 14 #include "ppapi/proxy/plugin_resource_tracker.h" | 13 #include "ppapi/proxy/plugin_resource_tracker.h" |
| 15 #include "ppapi/proxy/ppapi_messages.h" | 14 #include "ppapi/proxy/ppapi_messages.h" |
| 16 #include "ppapi/proxy/serialized_var.h" | 15 #include "ppapi/proxy/serialized_var.h" |
| 17 #include "ppapi/thunk/enter.h" | 16 #include "ppapi/thunk/enter.h" |
| 18 #include "ppapi/thunk/thunk.h" | 17 #include "ppapi/thunk/thunk.h" |
| 19 | 18 |
| 20 // Windows headers interfere with this file. | 19 // Windows headers interfere with this file. |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 ppapi::thunk::GetPPB_Instance_0_5_Thunk(), | 63 ppapi::thunk::GetPPB_Instance_0_5_Thunk(), |
| 65 PPB_INSTANCE_INTERFACE_0_5, | 64 PPB_INSTANCE_INTERFACE_0_5, |
| 66 INTERFACE_ID_PPB_INSTANCE, | 65 INTERFACE_ID_PPB_INSTANCE, |
| 67 false, | 66 false, |
| 68 &CreateInstanceProxy, | 67 &CreateInstanceProxy, |
| 69 }; | 68 }; |
| 70 return &info; | 69 return &info; |
| 71 } | 70 } |
| 72 | 71 |
| 73 // static | 72 // static |
| 74 const InterfaceProxy::Info* PPB_Instance_Proxy::GetInfoMessaging() { | |
| 75 static const Info info = { | |
| 76 ppapi::thunk::GetPPB_Messaging_Thunk(), | |
| 77 PPB_MESSAGING_INTERFACE, | |
| 78 INTERFACE_ID_NONE, // 0_5 is the canonical one. | |
| 79 false, | |
| 80 &CreateInstanceProxy, | |
| 81 }; | |
| 82 return &info; | |
| 83 } | |
| 84 | |
| 85 // static | |
| 86 const InterfaceProxy::Info* PPB_Instance_Proxy::GetInfoPrivate() { | 73 const InterfaceProxy::Info* PPB_Instance_Proxy::GetInfoPrivate() { |
| 87 static const Info info = { | 74 static const Info info = { |
| 88 ppapi::thunk::GetPPB_Instance_Private_Thunk(), | 75 ppapi::thunk::GetPPB_Instance_Private_Thunk(), |
| 89 PPB_INSTANCE_PRIVATE_INTERFACE, | 76 PPB_INSTANCE_PRIVATE_INTERFACE, |
| 90 INTERFACE_ID_NONE, // 0_5 is the canonical one. | 77 INTERFACE_ID_NONE, // 0_5 is the canonical one. |
| 91 false, | 78 false, |
| 92 &CreateInstanceProxy, | 79 &CreateInstanceProxy, |
| 93 }; | 80 }; |
| 94 return &info; | 81 return &info; |
| 95 } | 82 } |
| (...skipping 22 matching lines...) Expand all Loading... |
| 118 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_GetWindowObject, | 105 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_GetWindowObject, |
| 119 OnMsgGetWindowObject) | 106 OnMsgGetWindowObject) |
| 120 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_GetOwnerElementObject, | 107 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_GetOwnerElementObject, |
| 121 OnMsgGetOwnerElementObject) | 108 OnMsgGetOwnerElementObject) |
| 122 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_BindGraphics, | 109 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_BindGraphics, |
| 123 OnMsgBindGraphics) | 110 OnMsgBindGraphics) |
| 124 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_IsFullFrame, | 111 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_IsFullFrame, |
| 125 OnMsgIsFullFrame) | 112 OnMsgIsFullFrame) |
| 126 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_ExecuteScript, | 113 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_ExecuteScript, |
| 127 OnMsgExecuteScript) | 114 OnMsgExecuteScript) |
| 128 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_PostMessage, | |
| 129 OnMsgPostMessage) | |
| 130 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_SetFullscreen, | 115 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_SetFullscreen, |
| 131 OnMsgSetFullscreen) | 116 OnMsgSetFullscreen) |
| 132 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_GetScreenSize, | 117 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_GetScreenSize, |
| 133 OnMsgGetScreenSize) | 118 OnMsgGetScreenSize) |
| 134 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_RequestInputEvents, | 119 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_RequestInputEvents, |
| 135 OnMsgRequestInputEvents) | 120 OnMsgRequestInputEvents) |
| 136 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_ClearInputEvents, | 121 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_ClearInputEvents, |
| 137 OnMsgClearInputEvents) | 122 OnMsgClearInputEvents) |
| 138 IPC_MESSAGE_UNHANDLED(handled = false) | 123 IPC_MESSAGE_UNHANDLED(handled = false) |
| 139 IPC_END_MESSAGE_MAP() | 124 IPC_END_MESSAGE_MAP() |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 358 | 343 |
| 359 void PPB_Instance_Proxy::OnMsgPostMessage(PP_Instance instance, | 344 void PPB_Instance_Proxy::OnMsgPostMessage(PP_Instance instance, |
| 360 SerializedVarReceiveInput message) { | 345 SerializedVarReceiveInput message) { |
| 361 EnterFunctionNoLock<PPB_Instance_FunctionAPI> enter(instance, false); | 346 EnterFunctionNoLock<PPB_Instance_FunctionAPI> enter(instance, false); |
| 362 if (enter.succeeded()) | 347 if (enter.succeeded()) |
| 363 enter.functions()->PostMessage(instance, message.Get(dispatcher())); | 348 enter.functions()->PostMessage(instance, message.Get(dispatcher())); |
| 364 } | 349 } |
| 365 | 350 |
| 366 } // namespace proxy | 351 } // namespace proxy |
| 367 } // namespace pp | 352 } // namespace pp |
| OLD | NEW |