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

Side by Side Diff: content/renderer/pepper/pepper_plugin_delegate_impl.cc

Issue 10993078: Use extensions socket permission for TCP/UDP socket APIs in Pepper (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nit Created 8 years, 2 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 "content/renderer/pepper/pepper_plugin_delegate_impl.h" 5 #include "content/renderer/pepper/pepper_plugin_delegate_impl.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <cstddef> 8 #include <cstddef>
9 #include <map> 9 #include <map>
10 #include <queue> 10 #include <queue>
(...skipping 1236 matching lines...) Expand 10 before | Expand all | Expand 10 after
1247 render_view_->Send( 1247 render_view_->Send(
1248 new PpapiHostMsg_PPBUDPSocket_RecvFrom(socket_id, num_bytes)); 1248 new PpapiHostMsg_PPBUDPSocket_RecvFrom(socket_id, num_bytes));
1249 } 1249 }
1250 1250
1251 void PepperPluginDelegateImpl::UDPSocketSendTo( 1251 void PepperPluginDelegateImpl::UDPSocketSendTo(
1252 uint32 socket_id, 1252 uint32 socket_id,
1253 const std::string& buffer, 1253 const std::string& buffer,
1254 const PP_NetAddress_Private& net_addr) { 1254 const PP_NetAddress_Private& net_addr) {
1255 DCHECK(udp_sockets_.Lookup(socket_id)); 1255 DCHECK(udp_sockets_.Lookup(socket_id));
1256 render_view_->Send( 1256 render_view_->Send(
1257 new PpapiHostMsg_PPBUDPSocket_SendTo(socket_id, buffer, net_addr)); 1257 new PpapiHostMsg_PPBUDPSocket_SendTo(render_view_->routing_id(),
1258 socket_id, buffer, net_addr));
1258 } 1259 }
1259 1260
1260 void PepperPluginDelegateImpl::UDPSocketClose(uint32 socket_id) { 1261 void PepperPluginDelegateImpl::UDPSocketClose(uint32 socket_id) {
1261 // There are no DCHECK(udp_sockets_.Lookup(socket_id)) because it 1262 // There are no DCHECK(udp_sockets_.Lookup(socket_id)) because it
1262 // can be called before UDPSocketBind is called. 1263 // can be called before UDPSocketBind is called.
1263 render_view_->Send(new PpapiHostMsg_PPBUDPSocket_Close(socket_id)); 1264 render_view_->Send(new PpapiHostMsg_PPBUDPSocket_Close(socket_id));
1264 if (udp_sockets_.Lookup(socket_id)) 1265 if (udp_sockets_.Lookup(socket_id))
1265 udp_sockets_.Remove(socket_id); 1266 udp_sockets_.Remove(socket_id);
1266 } 1267 }
1267 1268
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after
1874 else 1875 else
1875 return render_view_->mouse_lock_dispatcher(); 1876 return render_view_->mouse_lock_dispatcher();
1876 } 1877 }
1877 1878
1878 webkit_glue::ClipboardClient* 1879 webkit_glue::ClipboardClient*
1879 PepperPluginDelegateImpl::CreateClipboardClient() const { 1880 PepperPluginDelegateImpl::CreateClipboardClient() const {
1880 return new RendererClipboardClient; 1881 return new RendererClipboardClient;
1881 } 1882 }
1882 1883
1883 } // namespace content 1884 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698