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

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

Issue 9669038: Added out-of-process support for server sockets. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Sync. Created 8 years, 9 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
OLDNEW
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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 // dispatching, then uses the message router. We don't actually need any of 76 // dispatching, then uses the message router. We don't actually need any of
77 // this so this function just overrides that one. 77 // this so this function just overrides that one.
78 // 78 //
79 // Note that this function is called only for messages from the channel to the 79 // Note that this function is called only for messages from the channel to the
80 // browser process. Messages from the renderer process are sent via a different 80 // browser process. Messages from the renderer process are sent via a different
81 // channel that ends up at Dispatcher::OnMessageReceived. 81 // channel that ends up at Dispatcher::OnMessageReceived.
82 bool PpapiThread::OnMessageReceived(const IPC::Message& msg) { 82 bool PpapiThread::OnMessageReceived(const IPC::Message& msg) {
83 IPC_BEGIN_MESSAGE_MAP(PpapiThread, msg) 83 IPC_BEGIN_MESSAGE_MAP(PpapiThread, msg)
84 IPC_MESSAGE_HANDLER(PpapiMsg_LoadPlugin, OnMsgLoadPlugin) 84 IPC_MESSAGE_HANDLER(PpapiMsg_LoadPlugin, OnMsgLoadPlugin)
85 IPC_MESSAGE_HANDLER(PpapiMsg_CreateChannel, OnMsgCreateChannel) 85 IPC_MESSAGE_HANDLER(PpapiMsg_CreateChannel, OnMsgCreateChannel)
86 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBTCPServerSocket_ListenACK,
87 OnPluginDispatcherMessageReceived(msg))
88 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBTCPServerSocket_AcceptACK,
89 OnPluginDispatcherMessageReceived(msg))
86 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBTCPSocket_ConnectACK, 90 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBTCPSocket_ConnectACK,
87 OnPluginDispatcherMessageReceived(msg)) 91 OnPluginDispatcherMessageReceived(msg))
88 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBTCPSocket_SSLHandshakeACK, 92 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBTCPSocket_SSLHandshakeACK,
89 OnPluginDispatcherMessageReceived(msg)) 93 OnPluginDispatcherMessageReceived(msg))
90 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBTCPSocket_ReadACK, 94 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBTCPSocket_ReadACK,
91 OnPluginDispatcherMessageReceived(msg)) 95 OnPluginDispatcherMessageReceived(msg))
92 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBTCPSocket_WriteACK, 96 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBTCPSocket_WriteACK,
93 OnPluginDispatcherMessageReceived(msg)) 97 OnPluginDispatcherMessageReceived(msg))
94 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBUDPSocket_RecvFromACK, 98 IPC_MESSAGE_HANDLER_GENERIC(PpapiMsg_PPBUDPSocket_RecvFromACK,
95 OnPluginDispatcherMessageReceived(msg)) 99 OnPluginDispatcherMessageReceived(msg))
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 319
316 // From here, the dispatcher will manage its own lifetime according to the 320 // From here, the dispatcher will manage its own lifetime according to the
317 // lifetime of the attached channel. 321 // lifetime of the attached channel.
318 return true; 322 return true;
319 } 323 }
320 324
321 void PpapiThread::SavePluginName(const FilePath& path) { 325 void PpapiThread::SavePluginName(const FilePath& path) {
322 ppapi::proxy::PluginGlobals::Get()->set_plugin_name( 326 ppapi::proxy::PluginGlobals::Get()->set_plugin_name(
323 path.BaseName().AsUTF8Unsafe()); 327 path.BaseName().AsUTF8Unsafe());
324 } 328 }
OLDNEW
« no previous file with comments | « content/browser/renderer_host/pepper_tcp_server_socket.cc ('k') | content/renderer/pepper/pepper_plugin_delegate_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698