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

Side by Side Diff: ppapi/proxy/ppb_udp_socket_private_proxy.cc

Issue 9212047: Add GetBoundAddress to PPB_UDPSocket_Private (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: fix build error after rebase Created 8 years, 10 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) 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 "ppapi/proxy/ppb_udp_socket_private_proxy.h" 5 #include "ppapi/proxy/ppb_udp_socket_private_proxy.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "ppapi/proxy/plugin_dispatcher.h" 10 #include "ppapi/proxy/plugin_dispatcher.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 IPC_MESSAGE_HANDLER(PpapiMsg_PPBUDPSocket_SendToACK, 119 IPC_MESSAGE_HANDLER(PpapiMsg_PPBUDPSocket_SendToACK,
120 OnMsgSendToACK) 120 OnMsgSendToACK)
121 IPC_MESSAGE_UNHANDLED(handled = false) 121 IPC_MESSAGE_UNHANDLED(handled = false)
122 IPC_END_MESSAGE_MAP() 122 IPC_END_MESSAGE_MAP()
123 return handled; 123 return handled;
124 } 124 }
125 125
126 void PPB_UDPSocket_Private_Proxy::OnMsgBindACK( 126 void PPB_UDPSocket_Private_Proxy::OnMsgBindACK(
127 uint32 /* plugin_dispatcher_id */, 127 uint32 /* plugin_dispatcher_id */,
128 uint32 socket_id, 128 uint32 socket_id,
129 bool succeeded) { 129 bool succeeded,
130 const PP_NetAddress_Private& bound_addr) {
130 if (!g_id_to_socket) { 131 if (!g_id_to_socket) {
131 NOTREACHED(); 132 NOTREACHED();
132 return; 133 return;
133 } 134 }
134 IDToSocketMap::iterator iter = g_id_to_socket->find(socket_id); 135 IDToSocketMap::iterator iter = g_id_to_socket->find(socket_id);
135 if (iter == g_id_to_socket->end()) 136 if (iter == g_id_to_socket->end())
136 return; 137 return;
137 iter->second->OnBindCompleted(succeeded); 138 iter->second->OnBindCompleted(succeeded, bound_addr);
138 } 139 }
139 140
140 void PPB_UDPSocket_Private_Proxy::OnMsgRecvFromACK( 141 void PPB_UDPSocket_Private_Proxy::OnMsgRecvFromACK(
141 uint32 /* plugin_dispatcher_id */, 142 uint32 /* plugin_dispatcher_id */,
142 uint32 socket_id, 143 uint32 socket_id,
143 bool succeeded, 144 bool succeeded,
144 const std::string& data, 145 const std::string& data,
145 const PP_NetAddress_Private& addr) { 146 const PP_NetAddress_Private& addr) {
146 if (!g_id_to_socket) { 147 if (!g_id_to_socket) {
147 NOTREACHED(); 148 NOTREACHED();
(...skipping 15 matching lines...) Expand all
163 return; 164 return;
164 } 165 }
165 IDToSocketMap::iterator iter = g_id_to_socket->find(socket_id); 166 IDToSocketMap::iterator iter = g_id_to_socket->find(socket_id);
166 if (iter == g_id_to_socket->end()) 167 if (iter == g_id_to_socket->end())
167 return; 168 return;
168 iter->second->OnSendToCompleted(succeeded, bytes_written); 169 iter->second->OnSendToCompleted(succeeded, bytes_written);
169 } 170 }
170 171
171 } // namespace proxy 172 } // namespace proxy
172 } // namespace ppapi 173 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/ppb_udp_socket_private_proxy.h ('k') | ppapi/shared_impl/private/udp_socket_private_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698