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

Unified Diff: content/renderer/pepper_plugin_delegate_impl.h

Issue 9283022: Exposed Listen and Accept methods to plugin. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Added comment, fixed StopListening. 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/pepper_plugin_delegate_impl.h
diff --git a/content/renderer/pepper_plugin_delegate_impl.h b/content/renderer/pepper_plugin_delegate_impl.h
index c4b6cbd07f381e576cdb05bd5f48671b857a0c1c..b58ef90fb9224322462c9e0f3051f1c37107f13e 100644
--- a/content/renderer/pepper_plugin_delegate_impl.h
+++ b/content/renderer/pepper_plugin_delegate_impl.h
@@ -333,6 +333,9 @@ class PepperPluginDelegateImpl
virtual void TCPSocketWrite(uint32 socket_id,
const std::string& buffer) OVERRIDE;
virtual void TCPSocketDisconnect(uint32 socket_id) OVERRIDE;
+ virtual void RegisterTCPSocket(
+ webkit::ppapi::PPB_TCPSocket_Private_Impl* socket,
+ uint32 socket_id) OVERRIDE;
virtual uint32 UDPSocketCreate() OVERRIDE;
virtual void UDPSocketBind(
@@ -345,6 +348,14 @@ class PepperPluginDelegateImpl
const std::string& buffer,
const PP_NetAddress_Private& addr) OVERRIDE;
virtual void UDPSocketClose(uint32 socket_id) OVERRIDE;
+ virtual void TCPServerSocketListen(
+ webkit::ppapi::PPB_TCPServerSocket_Private_Impl* socket,
+ uint32 temp_socket_id,
+ const PP_NetAddress_Private& addr,
+ int32_t backlog) OVERRIDE;
+ virtual void TCPServerSocketAccept(uint32 real_socket_id) OVERRIDE;
+ virtual void TCPServerSocketStopListening(uint32 real_socket_id,
+ uint32 temp_socket_id) OVERRIDE;
virtual int32_t ShowContextMenu(
webkit::ppapi::PluginInstance* instance,
@@ -419,6 +430,15 @@ class PepperPluginDelegateImpl
bool succeeded,
const std::string& data,
const PP_NetAddress_Private& addr);
+ void OnTCPServerSocketListenACK(uint32 plugin_dispatcher_id,
+ uint32 real_socket_id,
+ uint32 temp_socket_id,
+ int32_t status);
+ void OnTCPServerSocketAcceptACK(uint32 plugin_dispatcher_id,
+ uint32 real_server_socket_id,
+ uint32 accepted_socket_id,
+ const PP_NetAddress_Private& local_addr,
+ const PP_NetAddress_Private& remote_addr);
CONTENT_EXPORT int GetRoutingId() const;
@@ -465,6 +485,11 @@ class PepperPluginDelegateImpl
IDMap<webkit::ppapi::PPB_UDPSocket_Private_Impl> udp_sockets_;
+ IDMap<webkit::ppapi::PPB_TCPServerSocket_Private_Impl> tcp_server_sockets_;
+
+ IDMap<webkit::ppapi::PPB_TCPServerSocket_Private_Impl>
+ uninitialized_tcp_server_sockets_;
+
IDMap<scoped_refptr<webkit::ppapi::PPB_Flash_Menu_Impl>,
IDMapOwnPointer> pending_context_menus_;

Powered by Google App Engine
This is Rietveld 408576698