| 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 "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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBTCPSocket_ReadACK, | 90 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBTCPSocket_ReadACK, |
| 91 OnPluginDispatcherMessageReceived(msg)) | 91 OnPluginDispatcherMessageReceived(msg)) |
| 92 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBTCPSocket_WriteACK, | 92 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBTCPSocket_WriteACK, |
| 93 OnPluginDispatcherMessageReceived(msg)) | 93 OnPluginDispatcherMessageReceived(msg)) |
| 94 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBUDPSocket_RecvFromACK, | 94 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBUDPSocket_RecvFromACK, |
| 95 OnPluginDispatcherMessageReceived(msg)) | 95 OnPluginDispatcherMessageReceived(msg)) |
| 96 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBUDPSocket_SendToACK, | 96 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBUDPSocket_SendToACK, |
| 97 OnPluginDispatcherMessageReceived(msg)) | 97 OnPluginDispatcherMessageReceived(msg)) |
| 98 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBUDPSocket_BindACK, | 98 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBUDPSocket_BindACK, |
| 99 OnPluginDispatcherMessageReceived(msg)) | 99 OnPluginDispatcherMessageReceived(msg)) |
| 100 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBHostResolver_ResolveACK, |
| 101 OnPluginDispatcherMessageReceived(msg)) |
| 100 IPC_MESSAGE_HANDLER(PpapiMsg_SetNetworkState, OnMsgSetNetworkState) | 102 IPC_MESSAGE_HANDLER(PpapiMsg_SetNetworkState, OnMsgSetNetworkState) |
| 101 IPC_END_MESSAGE_MAP() | 103 IPC_END_MESSAGE_MAP() |
| 102 return true; | 104 return true; |
| 103 } | 105 } |
| 104 | 106 |
| 105 base::MessageLoopProxy* PpapiThread::GetIPCMessageLoop() { | 107 base::MessageLoopProxy* PpapiThread::GetIPCMessageLoop() { |
| 106 return ChildProcess::current()->io_message_loop_proxy(); | 108 return ChildProcess::current()->io_message_loop_proxy(); |
| 107 } | 109 } |
| 108 | 110 |
| 109 base::WaitableEvent* PpapiThread::GetShutdownEvent() { | 111 base::WaitableEvent* PpapiThread::GetShutdownEvent() { |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 313 | 315 |
| 314 // From here, the dispatcher will manage its own lifetime according to the | 316 // From here, the dispatcher will manage its own lifetime according to the |
| 315 // lifetime of the attached channel. | 317 // lifetime of the attached channel. |
| 316 return true; | 318 return true; |
| 317 } | 319 } |
| 318 | 320 |
| 319 void PpapiThread::SavePluginName(const FilePath& path) { | 321 void PpapiThread::SavePluginName(const FilePath& path) { |
| 320 ppapi::proxy::PluginGlobals::Get()->set_plugin_name( | 322 ppapi::proxy::PluginGlobals::Get()->set_plugin_name( |
| 321 path.BaseName().AsUTF8Unsafe()); | 323 path.BaseName().AsUTF8Unsafe()); |
| 322 } | 324 } |
| OLD | NEW |