| Index: content/renderer/pepper_plugin_delegate_impl.cc
|
| diff --git a/content/renderer/pepper_plugin_delegate_impl.cc b/content/renderer/pepper_plugin_delegate_impl.cc
|
| index 5c177bd673e8bcdd6dc76fa6645d087db26d392a..c18af5703155cc64b4536f8ac3abe0e3daf47e20 100644
|
| --- a/content/renderer/pepper_plugin_delegate_impl.cc
|
| +++ b/content/renderer/pepper_plugin_delegate_impl.cc
|
| @@ -1746,9 +1746,6 @@ void PepperPluginDelegateImpl::OnConnectTcpACK(
|
| }
|
|
|
| uint32 PepperPluginDelegateImpl::TCPSocketCreate() {
|
| - if (!CanUseSocketAPIs())
|
| - return 0;
|
| -
|
| uint32 socket_id = 0;
|
| render_view_->Send(new PpapiHostMsg_PPBTCPSocket_Create(
|
| render_view_->routing_id(), 0, &socket_id));
|
| @@ -1761,8 +1758,8 @@ void PepperPluginDelegateImpl::TCPSocketConnect(
|
| const std::string& host,
|
| uint16_t port) {
|
| tcp_sockets_.AddWithID(socket, socket_id);
|
| - render_view_->Send(
|
| - new PpapiHostMsg_PPBTCPSocket_Connect(socket_id, host, port));
|
| + render_view_->Send(new PpapiHostMsg_PPBTCPSocket_Connect(
|
| + render_view_->routing_id(), socket_id, host, port));
|
| }
|
|
|
| void PepperPluginDelegateImpl::TCPSocketConnectWithNetAddress(
|
| @@ -1770,8 +1767,8 @@ void PepperPluginDelegateImpl::TCPSocketConnectWithNetAddress(
|
| uint32 socket_id,
|
| const PP_NetAddress_Private& addr) {
|
| tcp_sockets_.AddWithID(socket, socket_id);
|
| - render_view_->Send(
|
| - new PpapiHostMsg_PPBTCPSocket_ConnectWithNetAddress(socket_id, addr));
|
| + render_view_->Send(new PpapiHostMsg_PPBTCPSocket_ConnectWithNetAddress(
|
| + render_view_->routing_id(), socket_id, addr));
|
| }
|
|
|
| void PepperPluginDelegateImpl::TCPSocketSSLHandshake(
|
| @@ -1805,9 +1802,6 @@ void PepperPluginDelegateImpl::TCPSocketDisconnect(uint32 socket_id) {
|
| }
|
|
|
| uint32 PepperPluginDelegateImpl::UDPSocketCreate() {
|
| - if (!CanUseSocketAPIs())
|
| - return 0;
|
| -
|
| uint32 socket_id = 0;
|
| render_view_->Send(new PpapiHostMsg_PPBUDPSocket_Create(
|
| render_view_->routing_id(), 0, &socket_id));
|
| @@ -1819,7 +1813,8 @@ void PepperPluginDelegateImpl::UDPSocketBind(
|
| uint32 socket_id,
|
| const PP_NetAddress_Private& addr) {
|
| udp_sockets_.AddWithID(socket, socket_id);
|
| - render_view_->Send(new PpapiHostMsg_PPBUDPSocket_Bind(socket_id, addr));
|
| + render_view_->Send(new PpapiHostMsg_PPBUDPSocket_Bind(
|
| + render_view_->routing_id(), socket_id, addr));
|
| }
|
|
|
| void PepperPluginDelegateImpl::UDPSocketRecvFrom(uint32 socket_id,
|
| @@ -2221,16 +2216,6 @@ PepperPluginDelegateImpl::GetParentContextForPlatformContext3D() {
|
| return parent_context;
|
| }
|
|
|
| -bool PepperPluginDelegateImpl::CanUseSocketAPIs() {
|
| - WebView* webview = render_view_->webview();
|
| - WebFrame* main_frame = webview ? webview->mainFrame() : NULL;
|
| - GURL url(main_frame ? GURL(main_frame->document().url()) : GURL());
|
| - if (!url.is_valid())
|
| - return false;
|
| -
|
| - return content::GetContentClient()->renderer()->AllowSocketAPI(url);
|
| -}
|
| -
|
| MouseLockDispatcher::LockTarget*
|
| PepperPluginDelegateImpl::GetOrCreateLockTargetAdapter(
|
| webkit::ppapi::PluginInstance* instance) {
|
|
|