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

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

Issue 8824006: Migrate net/socket/socket.h, net/socket/stream_socket.h to base::Bind(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 9 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
« no previous file with comments | « webkit/plugins/ppapi/ppb_transport_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/ppb_transport_impl.cc
diff --git a/webkit/plugins/ppapi/ppb_transport_impl.cc b/webkit/plugins/ppapi/ppb_transport_impl.cc
index 44593d4964cd4c25670ffd858f370d814b77acbb..da656c82178917d48610ade6566511d5a987e3a3 100644
--- a/webkit/plugins/ppapi/ppb_transport_impl.cc
+++ b/webkit/plugins/ppapi/ppb_transport_impl.cc
@@ -68,11 +68,7 @@ WebKit::WebFrame* GetFrameForResource(const ::ppapi::Resource* resource) {
PPB_Transport_Impl::PPB_Transport_Impl(PP_Instance instance)
: Resource(instance),
started_(false),
- writable_(false),
- ALLOW_THIS_IN_INITIALIZER_LIST(
- channel_write_callback_(this, &PPB_Transport_Impl::OnWritten)),
- ALLOW_THIS_IN_INITIALIZER_LIST(
- channel_read_callback_(this, &PPB_Transport_Impl::OnRead)) {
+ writable_(false) {
}
PPB_Transport_Impl::~PPB_Transport_Impl() {
@@ -323,7 +319,9 @@ int32_t PPB_Transport_Impl::Recv(void* data, uint32_t len,
scoped_refptr<net::IOBuffer> buffer =
new net::WrappedIOBuffer(static_cast<const char*>(data));
- int result = MapNetError(channel->Read(buffer, len, &channel_read_callback_));
+ int result = MapNetError(
+ channel->Read(buffer, len, base::Bind(&PPB_Transport_Impl::OnRead,
+ base::Unretained(this))));
if (result == PP_OK_COMPLETIONPENDING) {
recv_callback_ = new TrackedCompletionCallback(
plugin_module->GetCallbackTracker(), pp_resource(), callback);
@@ -352,8 +350,9 @@ int32_t PPB_Transport_Impl::Send(const void* data, uint32_t len,
scoped_refptr<net::IOBuffer> buffer =
new net::WrappedIOBuffer(static_cast<const char*>(data));
- int result = MapNetError(channel->Write(buffer, len,
- &channel_write_callback_));
+ int result = MapNetError(
+ channel->Write(buffer, len, base::Bind(&PPB_Transport_Impl::OnWritten,
+ base::Unretained(this))));
if (result == PP_OK_COMPLETIONPENDING) {
send_callback_ = new TrackedCompletionCallback(
plugin_module->GetCallbackTracker(), pp_resource(), callback);
« no previous file with comments | « webkit/plugins/ppapi/ppb_transport_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698