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

Unified Diff: webkit/plugins/ppapi/ppb_transport_impl.h

Issue 7206016: Convert most remaining resources to use the API/thunk system. The significant (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 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
« no previous file with comments | « webkit/plugins/ppapi/ppb_surface_3d_impl.cc ('k') | webkit/plugins/ppapi/ppb_transport_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/ppb_transport_impl.h
===================================================================
--- webkit/plugins/ppapi/ppb_transport_impl.h (revision 89672)
+++ webkit/plugins/ppapi/ppb_transport_impl.h (working copy)
@@ -11,7 +11,7 @@
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
#include "net/base/completion_callback.h"
-#include "ppapi/c/dev/ppb_transport_dev.h"
+#include "ppapi/thunk/ppb_transport_api.h"
#include "webkit/glue/p2p_transport.h"
#include "webkit/plugins/ppapi/callbacks.h"
#include "webkit/plugins/ppapi/resource.h"
@@ -20,25 +20,29 @@
namespace ppapi {
class PPB_Transport_Impl : public Resource,
+ public ::ppapi::thunk::PPB_Transport_API,
public webkit_glue::P2PTransport::EventHandler {
public:
- static const PPB_Transport_Dev* GetInterface();
-
- explicit PPB_Transport_Impl(PluginInstance* instance);
virtual ~PPB_Transport_Impl();
- bool Init(const char* name, const char* proto);
+ static PP_Resource Create(PP_Instance instance,
+ const char* name,
+ const char* proto);
- // Resource override.
- virtual PPB_Transport_Impl* AsPPB_Transport_Impl() OVERRIDE;
+ // ResourceObjectBase override.
+ virtual ::ppapi::thunk::PPB_Transport_API* AsPPB_Transport_API() OVERRIDE;
- bool IsWritable() const;
- int32_t Connect(PP_CompletionCallback cb);
- int32_t GetNextAddress(PP_Var* address, PP_CompletionCallback cb);
- int32_t ReceiveRemoteAddress(PP_Var address);
- int32_t Recv(void* data, uint32_t len, PP_CompletionCallback cb);
- int32_t Send(const void* data, uint32_t len, PP_CompletionCallback cb);
- int32_t Close();
+ // PPB_Transport_API implementation.
+ virtual PP_Bool IsWritable() OVERRIDE;
+ virtual int32_t Connect(PP_CompletionCallback callback) OVERRIDE;
+ virtual int32_t GetNextAddress(PP_Var* address,
+ PP_CompletionCallback callback) OVERRIDE;
+ virtual int32_t ReceiveRemoteAddress(PP_Var address) OVERRIDE;
+ virtual int32_t Recv(void* data, uint32_t len,
+ PP_CompletionCallback callback) OVERRIDE;
+ virtual int32_t Send(const void* data, uint32_t len,
+ PP_CompletionCallback callback) OVERRIDE;
+ virtual int32_t Close() OVERRIDE;
// webkit_glue::P2PTransport::EventHandler implementation.
virtual void OnCandidateReady(const std::string& address) OVERRIDE;
@@ -46,6 +50,10 @@
virtual void OnError(int error) OVERRIDE;
private:
+ explicit PPB_Transport_Impl(PluginInstance* instance);
+
+ bool Init(const char* name, const char* proto);
+
void OnRead(int result);
void OnWritten(int result);
« no previous file with comments | « webkit/plugins/ppapi/ppb_surface_3d_impl.cc ('k') | webkit/plugins/ppapi/ppb_transport_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698