OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <map> | 5 #include <map> |
6 #include <set> | 6 #include <set> |
7 | 7 |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 // Need to include this before most other files because it defines | 9 // Need to include this before most other files because it defines |
10 // IPC_MESSAGE_LOG_ENABLED. We need to use it to define | 10 // IPC_MESSAGE_LOG_ENABLED. We need to use it to define |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
173 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBTCPSocket_ReadACK, | 173 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBTCPSocket_ReadACK, |
174 OnPluginDispatcherMessageReceived(msg)) | 174 OnPluginDispatcherMessageReceived(msg)) |
175 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBTCPSocket_WriteACK, | 175 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBTCPSocket_WriteACK, |
176 OnPluginDispatcherMessageReceived(msg)) | 176 OnPluginDispatcherMessageReceived(msg)) |
177 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBUDPSocket_RecvFromACK, | 177 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBUDPSocket_RecvFromACK, |
178 OnPluginDispatcherMessageReceived(msg)) | 178 OnPluginDispatcherMessageReceived(msg)) |
179 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBUDPSocket_SendToACK, | 179 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBUDPSocket_SendToACK, |
180 OnPluginDispatcherMessageReceived(msg)) | 180 OnPluginDispatcherMessageReceived(msg)) |
181 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBUDPSocket_BindACK, | 181 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBUDPSocket_BindACK, |
182 OnPluginDispatcherMessageReceived(msg)) | 182 OnPluginDispatcherMessageReceived(msg)) |
183 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBHostResolver_ResolveACK, | |
184 OnPluginDispatcherMessageReceived(msg)) | |
piman
2012/10/17 20:24:41
Is there a reason why we whitelist the messages we
bbudge
2012/10/17 20:41:06
We exclude code that won't be useful for NaCl apps
bbudge
2012/10/17 20:51:04
Oh, I see your point now. I'll make this forward a
| |
183 IPC_END_MESSAGE_MAP() | 185 IPC_END_MESSAGE_MAP() |
184 return true; | 186 return true; |
185 } | 187 } |
186 | 188 |
187 void PpapiDispatcher::OnMsgCreateNaClChannel( | 189 void PpapiDispatcher::OnMsgCreateNaClChannel( |
188 int renderer_id, | 190 int renderer_id, |
189 const ppapi::PpapiPermissions& permissions, | 191 const ppapi::PpapiPermissions& permissions, |
190 bool incognito, | 192 bool incognito, |
191 SerializedHandle handle) { | 193 SerializedHandle handle) { |
192 // Tell the process-global GetInterface which interfaces it can return to the | 194 // Tell the process-global GetInterface which interfaces it can return to the |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
270 | 272 |
271 PpapiDispatcher ppapi_dispatcher(io_thread.message_loop_proxy()); | 273 PpapiDispatcher ppapi_dispatcher(io_thread.message_loop_proxy()); |
272 plugin_globals.set_plugin_proxy_delegate(&ppapi_dispatcher); | 274 plugin_globals.set_plugin_proxy_delegate(&ppapi_dispatcher); |
273 | 275 |
274 loop.Run(); | 276 loop.Run(); |
275 | 277 |
276 NaClSrpcModuleFini(); | 278 NaClSrpcModuleFini(); |
277 | 279 |
278 return 0; | 280 return 0; |
279 } | 281 } |
OLD | NEW |