| 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBTCPSocket_ReadACK, | 94 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBTCPSocket_ReadACK, |
| 95 OnPluginDispatcherMessageReceived(msg)) | 95 OnPluginDispatcherMessageReceived(msg)) |
| 96 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBTCPSocket_WriteACK, | 96 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBTCPSocket_WriteACK, |
| 97 OnPluginDispatcherMessageReceived(msg)) | 97 OnPluginDispatcherMessageReceived(msg)) |
| 98 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBUDPSocket_RecvFromACK, | 98 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBUDPSocket_RecvFromACK, |
| 99 OnPluginDispatcherMessageReceived(msg)) | 99 OnPluginDispatcherMessageReceived(msg)) |
| 100 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBUDPSocket_SendToACK, | 100 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBUDPSocket_SendToACK, |
| 101 OnPluginDispatcherMessageReceived(msg)) | 101 OnPluginDispatcherMessageReceived(msg)) |
| 102 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBUDPSocket_BindACK, | 102 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBUDPSocket_BindACK, |
| 103 OnPluginDispatcherMessageReceived(msg)) | 103 OnPluginDispatcherMessageReceived(msg)) |
| 104 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBTalk_GetPermissionACK, |
| 105 OnPluginDispatcherMessageReceived(msg)) |
| 104 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBHostResolver_ResolveACK, | 106 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBHostResolver_ResolveACK, |
| 105 OnPluginDispatcherMessageReceived(msg)) | 107 OnPluginDispatcherMessageReceived(msg)) |
| 106 IPC_MESSAGE_HANDLER(PpapiMsg_SetNetworkState, OnMsgSetNetworkState) | 108 IPC_MESSAGE_HANDLER(PpapiMsg_SetNetworkState, OnMsgSetNetworkState) |
| 107 IPC_END_MESSAGE_MAP() | 109 IPC_END_MESSAGE_MAP() |
| 108 return true; | 110 return true; |
| 109 } | 111 } |
| 110 | 112 |
| 111 base::MessageLoopProxy* PpapiThread::GetIPCMessageLoop() { | 113 base::MessageLoopProxy* PpapiThread::GetIPCMessageLoop() { |
| 112 return ChildProcess::current()->io_message_loop_proxy(); | 114 return ChildProcess::current()->io_message_loop_proxy(); |
| 113 } | 115 } |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 | 321 |
| 320 // From here, the dispatcher will manage its own lifetime according to the | 322 // From here, the dispatcher will manage its own lifetime according to the |
| 321 // lifetime of the attached channel. | 323 // lifetime of the attached channel. |
| 322 return true; | 324 return true; |
| 323 } | 325 } |
| 324 | 326 |
| 325 void PpapiThread::SavePluginName(const FilePath& path) { | 327 void PpapiThread::SavePluginName(const FilePath& path) { |
| 326 ppapi::proxy::PluginGlobals::Get()->set_plugin_name( | 328 ppapi::proxy::PluginGlobals::Get()->set_plugin_name( |
| 327 path.BaseName().AsUTF8Unsafe()); | 329 path.BaseName().AsUTF8Unsafe()); |
| 328 } | 330 } |
| OLD | NEW |