| 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 "content/ppapi_plugin/ppapi_thread.h" | 5 #include "content/ppapi_plugin/ppapi_thread.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/process_util.h" | 10 #include "base/process_util.h" |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 IPC_MESSAGE_HANDLER(PpapiMsg_LoadPlugin, OnMsgLoadPlugin) | 74 IPC_MESSAGE_HANDLER(PpapiMsg_LoadPlugin, OnMsgLoadPlugin) |
| 75 IPC_MESSAGE_HANDLER(PpapiMsg_CreateChannel, OnMsgCreateChannel) | 75 IPC_MESSAGE_HANDLER(PpapiMsg_CreateChannel, OnMsgCreateChannel) |
| 76 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBFlashTCPSocket_ConnectACK, | 76 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBFlashTCPSocket_ConnectACK, |
| 77 OnPluginDispatcherMessageReceived(msg)) | 77 OnPluginDispatcherMessageReceived(msg)) |
| 78 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBFlashTCPSocket_SSLHandshakeACK, | 78 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBFlashTCPSocket_SSLHandshakeACK, |
| 79 OnPluginDispatcherMessageReceived(msg)) | 79 OnPluginDispatcherMessageReceived(msg)) |
| 80 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBFlashTCPSocket_ReadACK, | 80 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBFlashTCPSocket_ReadACK, |
| 81 OnPluginDispatcherMessageReceived(msg)) | 81 OnPluginDispatcherMessageReceived(msg)) |
| 82 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBFlashTCPSocket_WriteACK, | 82 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBFlashTCPSocket_WriteACK, |
| 83 OnPluginDispatcherMessageReceived(msg)) | 83 OnPluginDispatcherMessageReceived(msg)) |
| 84 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBFlashUDPSocket_RecvFromACK, |
| 85 OnPluginDispatcherMessageReceived(msg)) |
| 86 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBFlashUDPSocket_SendToACK, |
| 87 OnPluginDispatcherMessageReceived(msg)) |
| 88 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBFlashUDPSocket_BindACK, |
| 89 OnPluginDispatcherMessageReceived(msg)) |
| 84 IPC_MESSAGE_HANDLER(PpapiMsg_SetNetworkState, OnMsgSetNetworkState) | 90 IPC_MESSAGE_HANDLER(PpapiMsg_SetNetworkState, OnMsgSetNetworkState) |
| 85 IPC_END_MESSAGE_MAP() | 91 IPC_END_MESSAGE_MAP() |
| 86 return true; | 92 return true; |
| 87 } | 93 } |
| 88 | 94 |
| 89 base::MessageLoopProxy* PpapiThread::GetIPCMessageLoop() { | 95 base::MessageLoopProxy* PpapiThread::GetIPCMessageLoop() { |
| 90 return ChildProcess::current()->io_message_loop_proxy(); | 96 return ChildProcess::current()->io_message_loop_proxy(); |
| 91 } | 97 } |
| 92 | 98 |
| 93 base::WaitableEvent* PpapiThread::GetShutdownEvent() { | 99 base::WaitableEvent* PpapiThread::GetShutdownEvent() { |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 #if defined(OS_POSIX) | 301 #if defined(OS_POSIX) |
| 296 // On POSIX, pass the renderer-side FD. | 302 // On POSIX, pass the renderer-side FD. |
| 297 handle->socket = base::FileDescriptor(::dup(dispatcher->GetRendererFD()), | 303 handle->socket = base::FileDescriptor(::dup(dispatcher->GetRendererFD()), |
| 298 true); | 304 true); |
| 299 #endif | 305 #endif |
| 300 | 306 |
| 301 // From here, the dispatcher will manage its own lifetime according to the | 307 // From here, the dispatcher will manage its own lifetime according to the |
| 302 // lifetime of the attached channel. | 308 // lifetime of the attached channel. |
| 303 return true; | 309 return true; |
| 304 } | 310 } |
| OLD | NEW |