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

Unified Diff: content/renderer/pepper/pepper_plugin_delegate_impl.cc

Issue 11441012: PPB_UDPSocket_Private is switched to the new Pepper proxy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: PPB_UDPSocket_Shared is merged to UDPSocketPrivateResource. PepperUDPSocketPrivateShared is merged … Created 8 years 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/pepper/pepper_plugin_delegate_impl.cc
diff --git a/content/renderer/pepper/pepper_plugin_delegate_impl.cc b/content/renderer/pepper/pepper_plugin_delegate_impl.cc
index 7ff095ffb8241f82ab0c93f9614b263541cf57c1..0deab62d1f7ccc27b8a3427d4517fe17841769b6 100644
--- a/content/renderer/pepper/pepper_plugin_delegate_impl.cc
+++ b/content/renderer/pepper/pepper_plugin_delegate_impl.cc
@@ -89,7 +89,6 @@
#include "webkit/plugins/ppapi/ppb_flash_impl.h"
#include "webkit/plugins/ppapi/ppb_tcp_server_socket_private_impl.h"
#include "webkit/plugins/ppapi/ppb_tcp_socket_private_impl.h"
-#include "webkit/plugins/ppapi/ppb_udp_socket_private_impl.h"
#include "webkit/plugins/ppapi/resource_helper.h"
#include "webkit/plugins/webplugininfo.h"
@@ -1174,58 +1173,6 @@ void PepperPluginDelegateImpl::RegisterTCPSocket(
tcp_sockets_.AddWithID(socket, socket_id);
}
-uint32 PepperPluginDelegateImpl::UDPSocketCreate() {
- uint32 socket_id = 0;
- render_view_->Send(new PpapiHostMsg_PPBUDPSocket_Create(
- render_view_->routing_id(), 0, &socket_id));
- return socket_id;
-}
-
-void PepperPluginDelegateImpl::UDPSocketSetBoolSocketFeature(
- webkit::ppapi::PPB_UDPSocket_Private_Impl* socket,
- uint32 socket_id,
- int32_t name,
- bool value) {
- render_view_->Send(
- new PpapiHostMsg_PPBUDPSocket_SetBoolSocketFeature(
- render_view_->routing_id(), socket_id, name, value));
-}
-
-void PepperPluginDelegateImpl::UDPSocketBind(
- webkit::ppapi::PPB_UDPSocket_Private_Impl* socket,
- uint32 socket_id,
- const PP_NetAddress_Private& addr) {
- if (!udp_sockets_.Lookup(socket_id))
- udp_sockets_.AddWithID(socket, socket_id);
- render_view_->Send(new PpapiHostMsg_PPBUDPSocket_Bind(
- render_view_->routing_id(), socket_id, addr));
-}
-
-void PepperPluginDelegateImpl::UDPSocketRecvFrom(uint32 socket_id,
- int32_t num_bytes) {
- DCHECK(udp_sockets_.Lookup(socket_id));
- render_view_->Send(
- new PpapiHostMsg_PPBUDPSocket_RecvFrom(socket_id, num_bytes));
-}
-
-void PepperPluginDelegateImpl::UDPSocketSendTo(
- uint32 socket_id,
- const std::string& buffer,
- const PP_NetAddress_Private& net_addr) {
- DCHECK(udp_sockets_.Lookup(socket_id));
- render_view_->Send(
- new PpapiHostMsg_PPBUDPSocket_SendTo(render_view_->routing_id(),
- socket_id, buffer, net_addr));
-}
-
-void PepperPluginDelegateImpl::UDPSocketClose(uint32 socket_id) {
- // There are no DCHECK(udp_sockets_.Lookup(socket_id)) because it
- // can be called before UDPSocketBind is called.
- render_view_->Send(new PpapiHostMsg_PPBUDPSocket_Close(socket_id));
- if (udp_sockets_.Lookup(socket_id))
- udp_sockets_.Remove(socket_id);
-}
-
void PepperPluginDelegateImpl::TCPServerSocketListen(
PP_Resource socket_resource,
const PP_NetAddress_Private& addr,
@@ -1470,10 +1417,6 @@ bool PepperPluginDelegateImpl::OnMessageReceived(const IPC::Message& message) {
OnTCPSocketSSLHandshakeACK)
IPC_MESSAGE_HANDLER(PpapiMsg_PPBTCPSocket_ReadACK, OnTCPSocketReadACK)
IPC_MESSAGE_HANDLER(PpapiMsg_PPBTCPSocket_WriteACK, OnTCPSocketWriteACK)
- IPC_MESSAGE_HANDLER(PpapiMsg_PPBUDPSocket_BindACK, OnUDPSocketBindACK)
- IPC_MESSAGE_HANDLER(PpapiMsg_PPBUDPSocket_RecvFromACK,
- OnUDPSocketRecvFromACK)
- IPC_MESSAGE_HANDLER(PpapiMsg_PPBUDPSocket_SendToACK, OnUDPSocketSendToACK)
IPC_MESSAGE_HANDLER(PpapiMsg_PPBTCPServerSocket_ListenACK,
OnTCPServerSocketListenACK)
IPC_MESSAGE_HANDLER(PpapiMsg_PPBTCPServerSocket_AcceptACK,
@@ -1536,41 +1479,6 @@ void PepperPluginDelegateImpl::OnTCPSocketWriteACK(uint32 plugin_dispatcher_id,
socket->OnWriteCompleted(succeeded, bytes_written);
}
-void PepperPluginDelegateImpl::OnUDPSocketBindACK(
- uint32 plugin_dispatcher_id,
- uint32 socket_id,
- bool succeeded,
- const PP_NetAddress_Private& addr) {
- webkit::ppapi::PPB_UDPSocket_Private_Impl* socket =
- udp_sockets_.Lookup(socket_id);
- if (socket)
- socket->OnBindCompleted(succeeded, addr);
- if (!succeeded)
- udp_sockets_.Remove(socket_id);
-}
-
-void PepperPluginDelegateImpl::OnUDPSocketRecvFromACK(
- uint32 plugin_dispatcher_id,
- uint32 socket_id,
- bool succeeded,
- const std::string& data,
- const PP_NetAddress_Private& remote_addr) {
- webkit::ppapi::PPB_UDPSocket_Private_Impl* socket =
- udp_sockets_.Lookup(socket_id);
- if (socket)
- socket->OnRecvFromCompleted(succeeded, data, remote_addr);
-}
-
-void PepperPluginDelegateImpl::OnUDPSocketSendToACK(uint32 plugin_dispatcher_id,
- uint32 socket_id,
- bool succeeded,
- int32_t bytes_written) {
- webkit::ppapi::PPB_UDPSocket_Private_Impl* socket =
- udp_sockets_.Lookup(socket_id);
- if (socket)
- socket->OnSendToCompleted(succeeded, bytes_written);
-}
-
void PepperPluginDelegateImpl::OnTCPServerSocketListenACK(
uint32 plugin_dispatcher_id,
PP_Resource socket_resource,

Powered by Google App Engine
This is Rietveld 408576698