Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Side by Side Diff: content/ppapi_plugin/ppapi_thread.cc

Issue 7745005: Initial work for UDP Pepper API (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: A few more changes after self-review Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 IPC_MESSAGE_HANDLER(PpapiMsg_LoadPlugin, OnMsgLoadPlugin) 73 IPC_MESSAGE_HANDLER(PpapiMsg_LoadPlugin, OnMsgLoadPlugin)
74 IPC_MESSAGE_HANDLER(PpapiMsg_CreateChannel, OnMsgCreateChannel) 74 IPC_MESSAGE_HANDLER(PpapiMsg_CreateChannel, OnMsgCreateChannel)
75 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBFlashTCPSocket_ConnectACK, 75 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBFlashTCPSocket_ConnectACK,
76 OnPluginDispatcherMessageReceived(msg)) 76 OnPluginDispatcherMessageReceived(msg))
77 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBFlashTCPSocket_SSLHandshakeACK, 77 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBFlashTCPSocket_SSLHandshakeACK,
78 OnPluginDispatcherMessageReceived(msg)) 78 OnPluginDispatcherMessageReceived(msg))
79 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBFlashTCPSocket_ReadACK, 79 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBFlashTCPSocket_ReadACK,
80 OnPluginDispatcherMessageReceived(msg)) 80 OnPluginDispatcherMessageReceived(msg))
81 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBFlashTCPSocket_WriteACK, 81 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBFlashTCPSocket_WriteACK,
82 OnPluginDispatcherMessageReceived(msg)) 82 OnPluginDispatcherMessageReceived(msg))
83 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBFlashUDPSocket_RecvFromACK,
84 OnPluginDispatcherMessageReceived(msg))
85 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBFlashUDPSocket_SendToACK,
86 OnPluginDispatcherMessageReceived(msg))
87 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBFlashUDPSocket_BindACK,
88 OnPluginDispatcherMessageReceived(msg))
83 IPC_MESSAGE_HANDLER(PpapiMsg_SetNetworkState, OnMsgSetNetworkState) 89 IPC_MESSAGE_HANDLER(PpapiMsg_SetNetworkState, OnMsgSetNetworkState)
84 IPC_END_MESSAGE_MAP() 90 IPC_END_MESSAGE_MAP()
85 return true; 91 return true;
86 } 92 }
87 93
88 base::MessageLoopProxy* PpapiThread::GetIPCMessageLoop() { 94 base::MessageLoopProxy* PpapiThread::GetIPCMessageLoop() {
89 return ChildProcess::current()->io_message_loop_proxy(); 95 return ChildProcess::current()->io_message_loop_proxy();
90 } 96 }
91 97
92 base::WaitableEvent* PpapiThread::GetShutdownEvent() { 98 base::WaitableEvent* PpapiThread::GetShutdownEvent() {
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 #if defined(OS_POSIX) 298 #if defined(OS_POSIX)
293 // On POSIX, pass the renderer-side FD. 299 // On POSIX, pass the renderer-side FD.
294 handle->socket = base::FileDescriptor(::dup(dispatcher->GetRendererFD()), 300 handle->socket = base::FileDescriptor(::dup(dispatcher->GetRendererFD()),
295 true); 301 true);
296 #endif 302 #endif
297 303
298 // From here, the dispatcher will manage its own lifetime according to the 304 // From here, the dispatcher will manage its own lifetime according to the
299 // lifetime of the attached channel. 305 // lifetime of the attached channel.
300 return true; 306 return true;
301 } 307 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698