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