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

Unified Diff: content/renderer/pepper/ppb_tcp_socket_private_impl.h

Issue 20777009: A few more cleanups to the pepper code. Dispatch IPCs in the sockets implementations directly by ha… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 5 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/ppb_tcp_socket_private_impl.h
===================================================================
--- content/renderer/pepper/ppb_tcp_socket_private_impl.h (revision 214423)
+++ content/renderer/pepper/ppb_tcp_socket_private_impl.h (working copy)
@@ -8,13 +8,13 @@
#include <vector>
#include "base/compiler_specific.h"
+#include "content/public/renderer/render_view_observer.h"
#include "ppapi/shared_impl/private/tcp_socket_private_impl.h"
namespace content {
-class PepperHelperImpl;
-
-class PPB_TCPSocket_Private_Impl : public ::ppapi::TCPSocketPrivateImpl {
+class PPB_TCPSocket_Private_Impl : public ::ppapi::TCPSocketPrivateImpl,
+ public RenderViewObserver {
public:
static PP_Resource CreateResource(PP_Instance instance);
static PP_Resource CreateConnectedSocket(
@@ -38,11 +38,37 @@
const ::ppapi::SocketOptionData& value) OVERRIDE;
private:
- PPB_TCPSocket_Private_Impl(PP_Instance instance, uint32 socket_id);
+ PPB_TCPSocket_Private_Impl(PP_Instance instance,
+ uint32 socket_id,
+ RenderView* render_view);
virtual ~PPB_TCPSocket_Private_Impl();
- static PepperHelperImpl* GetHelper(PP_Instance instance);
+ // RenderViewObserver implementation.
+ virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
+ void OnTCPSocketConnectACK(uint32 plugin_dispatcher_id,
+ uint32 socket_id,
+ int32_t result,
+ const PP_NetAddress_Private& local_addr,
+ const PP_NetAddress_Private& remote_addr);
+ void OnTCPSocketSSLHandshakeACK(
+ uint32 plugin_dispatcher_id,
+ uint32 socket_id,
+ bool succeeded,
+ const ppapi::PPB_X509Certificate_Fields& certificate_fields);
+ void OnTCPSocketReadACK(uint32 plugin_dispatcher_id,
+ uint32 socket_id,
+ int32_t result,
+ const std::string& data);
+ void OnTCPSocketWriteACK(uint32 plugin_dispatcher_id,
+ uint32 socket_id,
+ int32_t result);
+ void OnTCPSocketSetOptionACK(uint32 plugin_dispatcher_id,
+ uint32 socket_id,
+ int32_t result);
+
+ int routing_id_;
+
DISALLOW_COPY_AND_ASSIGN(PPB_TCPSocket_Private_Impl);
};

Powered by Google App Engine
This is Rietveld 408576698