OLD | NEW |
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 1195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1206 void PepperPluginDelegateImpl::TCPSocketDisconnect(uint32 socket_id) { | 1206 void PepperPluginDelegateImpl::TCPSocketDisconnect(uint32 socket_id) { |
1207 // There is no DCHECK(tcp_sockets_.Lookup(socket_id)) because this method | 1207 // There is no DCHECK(tcp_sockets_.Lookup(socket_id)) because this method |
1208 // can be called before TCPSocketConnect or TCPSocketConnectWithNetAddress. | 1208 // can be called before TCPSocketConnect or TCPSocketConnectWithNetAddress. |
1209 render_view_->Send(new PpapiHostMsg_PPBTCPSocket_Disconnect(socket_id)); | 1209 render_view_->Send(new PpapiHostMsg_PPBTCPSocket_Disconnect(socket_id)); |
1210 if (tcp_sockets_.Lookup(socket_id)) | 1210 if (tcp_sockets_.Lookup(socket_id)) |
1211 tcp_sockets_.Remove(socket_id); | 1211 tcp_sockets_.Remove(socket_id); |
1212 } | 1212 } |
1213 | 1213 |
1214 void PepperPluginDelegateImpl::TCPSocketSetOption( | 1214 void PepperPluginDelegateImpl::TCPSocketSetOption( |
1215 uint32 socket_id, | 1215 uint32 socket_id, |
1216 PP_TCPSocket_Option_Dev name, | 1216 PP_TCPSocket_Option name, |
1217 const ppapi::SocketOptionData& value) { | 1217 const ppapi::SocketOptionData& value) { |
1218 DCHECK(tcp_sockets_.Lookup(socket_id)); | 1218 DCHECK(tcp_sockets_.Lookup(socket_id)); |
1219 render_view_->Send( | 1219 render_view_->Send( |
1220 new PpapiHostMsg_PPBTCPSocket_SetOption(socket_id, name, value)); | 1220 new PpapiHostMsg_PPBTCPSocket_SetOption(socket_id, name, value)); |
1221 } | 1221 } |
1222 | 1222 |
1223 void PepperPluginDelegateImpl::RegisterTCPSocket( | 1223 void PepperPluginDelegateImpl::RegisterTCPSocket( |
1224 webkit::ppapi::PPB_TCPSocket_Private_Impl* socket, | 1224 webkit::ppapi::PPB_TCPSocket_Private_Impl* socket, |
1225 uint32 socket_id) { | 1225 uint32 socket_id) { |
1226 tcp_sockets_.AddWithID(socket, socket_id); | 1226 tcp_sockets_.AddWithID(socket, socket_id); |
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1704 should_close_source); | 1704 should_close_source); |
1705 } | 1705 } |
1706 | 1706 |
1707 bool PepperPluginDelegateImpl::IsRunningInProcess(PP_Instance instance) const { | 1707 bool PepperPluginDelegateImpl::IsRunningInProcess(PP_Instance instance) const { |
1708 RendererPpapiHostImpl* host = | 1708 RendererPpapiHostImpl* host = |
1709 RendererPpapiHostImpl::GetForPPInstance(instance); | 1709 RendererPpapiHostImpl::GetForPPInstance(instance); |
1710 return host && host->IsRunningInProcess(); | 1710 return host && host->IsRunningInProcess(); |
1711 } | 1711 } |
1712 | 1712 |
1713 } // namespace content | 1713 } // namespace content |
OLD | NEW |