| 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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, | 104 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBTalk_GetPermissionACK, |
| 105 OnPluginDispatcherMessageReceived(msg)) | 105 OnPluginDispatcherMessageReceived(msg)) |
| 106 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBHostResolver_ResolveACK, | 106 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBHostResolver_ResolveACK, |
| 107 OnPluginDispatcherMessageReceived(msg)) | 107 OnPluginDispatcherMessageReceived(msg)) |
| 108 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBNetworkMonitor_NetworkList, |
| 109 OnPluginDispatcherMessageReceived(msg)) |
| 108 IPC_MESSAGE_HANDLER(PpapiMsg_SetNetworkState, OnMsgSetNetworkState) | 110 IPC_MESSAGE_HANDLER(PpapiMsg_SetNetworkState, OnMsgSetNetworkState) |
| 109 IPC_END_MESSAGE_MAP() | 111 IPC_END_MESSAGE_MAP() |
| 110 return true; | 112 return true; |
| 111 } | 113 } |
| 112 | 114 |
| 113 base::MessageLoopProxy* PpapiThread::GetIPCMessageLoop() { | 115 base::MessageLoopProxy* PpapiThread::GetIPCMessageLoop() { |
| 114 return ChildProcess::current()->io_message_loop_proxy(); | 116 return ChildProcess::current()->io_message_loop_proxy(); |
| 115 } | 117 } |
| 116 | 118 |
| 117 base::WaitableEvent* PpapiThread::GetShutdownEvent() { | 119 base::WaitableEvent* PpapiThread::GetShutdownEvent() { |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 | 323 |
| 322 // From here, the dispatcher will manage its own lifetime according to the | 324 // From here, the dispatcher will manage its own lifetime according to the |
| 323 // lifetime of the attached channel. | 325 // lifetime of the attached channel. |
| 324 return true; | 326 return true; |
| 325 } | 327 } |
| 326 | 328 |
| 327 void PpapiThread::SavePluginName(const FilePath& path) { | 329 void PpapiThread::SavePluginName(const FilePath& path) { |
| 328 ppapi::proxy::PluginGlobals::Get()->set_plugin_name( | 330 ppapi::proxy::PluginGlobals::Get()->set_plugin_name( |
| 329 path.BaseName().AsUTF8Unsafe()); | 331 path.BaseName().AsUTF8Unsafe()); |
| 330 } | 332 } |
| OLD | NEW |