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

Side by Side Diff: webkit/plugins/ppapi/ppb_tcp_server_socket_private_impl.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 "webkit/plugins/ppapi/ppb_tcp_server_socket_private_impl.h" 5 #include "webkit/plugins/ppapi/ppb_tcp_server_socket_private_impl.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "webkit/plugins/ppapi/host_globals.h" 8 #include "webkit/plugins/ppapi/host_globals.h"
9 #include "webkit/plugins/ppapi/plugin_delegate.h" 9 #include "webkit/plugins/ppapi/plugin_delegate.h"
10 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" 10 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 local_addr, 48 local_addr,
49 remote_addr); 49 remote_addr);
50 } 50 }
51 tcp_socket_buffer_ = NULL; 51 tcp_socket_buffer_ = NULL;
52 52
53 ::ppapi::TrackedCallback::ClearAndRun(&accept_callback_, 53 ::ppapi::TrackedCallback::ClearAndRun(&accept_callback_,
54 succeeded ? PP_OK : PP_ERROR_FAILED); 54 succeeded ? PP_OK : PP_ERROR_FAILED);
55 } 55 }
56 56
57 void PPB_TCPServerSocket_Private_Impl::SendListen( 57 void PPB_TCPServerSocket_Private_Impl::SendListen(
58 uint32 temp_socket_id,
59 const PP_NetAddress_Private& addr, 58 const PP_NetAddress_Private& addr,
60 int32_t backlog) { 59 int32_t backlog) {
61 PluginDelegate* plugin_delegate = ResourceHelper::GetPluginDelegate(this); 60 PluginDelegate* plugin_delegate = ResourceHelper::GetPluginDelegate(this);
62 if (!plugin_delegate) 61 if (!plugin_delegate)
63 return; 62 return;
64 63
65 plugin_delegate->TCPServerSocketListen(this, temp_socket_id, addr, backlog); 64 plugin_delegate->TCPServerSocketListen(this, pp_resource(), addr, backlog);
66 } 65 }
67 66
68 void PPB_TCPServerSocket_Private_Impl::SendAccept() { 67 void PPB_TCPServerSocket_Private_Impl::SendAccept() {
69 PluginDelegate* plugin_delegate = ResourceHelper::GetPluginDelegate(this); 68 PluginDelegate* plugin_delegate = ResourceHelper::GetPluginDelegate(this);
70 if (!plugin_delegate) 69 if (!plugin_delegate)
71 return; 70 return;
72 71
73 plugin_delegate->TCPServerSocketAccept(real_socket_id_); 72 plugin_delegate->TCPServerSocketAccept(real_socket_id_);
74 } 73 }
75 74
76 void PPB_TCPServerSocket_Private_Impl::SendStopListening() { 75 void PPB_TCPServerSocket_Private_Impl::SendStopListening() {
77 PluginDelegate* plugin_delegate = ResourceHelper::GetPluginDelegate(this); 76 PluginDelegate* plugin_delegate = ResourceHelper::GetPluginDelegate(this);
78 if (!plugin_delegate) 77 if (!plugin_delegate)
79 return; 78 return;
80 79
81 plugin_delegate->TCPServerSocketStopListening(real_socket_id_, 80 plugin_delegate->TCPServerSocketStopListening(pp_resource(),
82 temp_socket_id_); 81 real_socket_id_);
83 } 82 }
84 83
85 } // namespace ppapi 84 } // namespace ppapi
86 } // namespace webkit 85 } // namespace webkit
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698