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

Unified Diff: content/common/webmessageportchannel_impl.cc

Issue 8556001: Convert NewRunnableFunction/NewRunnableMethod calls to use base::Bind(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 1 month 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/common/webmessageportchannel_impl.cc
diff --git a/content/common/webmessageportchannel_impl.cc b/content/common/webmessageportchannel_impl.cc
index 6a9ac365498fccc7dcce673f4e78552e853df271..fc938ff7915e1007c76eb355876be28b19bbcc13 100644
--- a/content/common/webmessageportchannel_impl.cc
+++ b/content/common/webmessageportchannel_impl.cc
@@ -4,6 +4,7 @@
#include "content/common/webmessageportchannel_impl.h"
+#include "base/bind.h"
#include "content/common/child_process.h"
#include "content/common/child_thread.h"
#include "content/common/worker_messages.h"
@@ -79,7 +80,7 @@ void WebMessagePortChannelImpl::postMessage(
WebMessagePortChannelArray* channels) {
if (MessageLoop::current() != ChildThread::current()->message_loop()) {
ChildThread::current()->message_loop()->PostTask(FROM_HERE,
James Hawkins 2011/11/14 17:57:06 Start of parameters must be on the same column.
dcheng 2011/11/14 20:47:49 Done.
- NewRunnableMethod(this, &WebMessagePortChannelImpl::postMessage,
+ base::Bind(&WebMessagePortChannelImpl::postMessage, this,
message, channels));
return;
}
@@ -125,7 +126,7 @@ bool WebMessagePortChannelImpl::tryGetMessage(
void WebMessagePortChannelImpl::Init() {
if (MessageLoop::current() != ChildThread::current()->message_loop()) {
ChildThread::current()->message_loop()->PostTask(FROM_HERE,
- NewRunnableMethod(this, &WebMessagePortChannelImpl::Init));
+ base::Bind(&WebMessagePortChannelImpl::Init, this));
return;
}
@@ -142,7 +143,7 @@ void WebMessagePortChannelImpl::Entangle(
scoped_refptr<WebMessagePortChannelImpl> channel) {
if (MessageLoop::current() != ChildThread::current()->message_loop()) {
ChildThread::current()->message_loop()->PostTask(FROM_HERE,
- NewRunnableMethod(this, &WebMessagePortChannelImpl::Entangle, channel));
+ base::Bind(&WebMessagePortChannelImpl::Entangle, this, channel));
return;
}
@@ -153,7 +154,7 @@ void WebMessagePortChannelImpl::Entangle(
void WebMessagePortChannelImpl::QueueMessages() {
if (MessageLoop::current() != ChildThread::current()->message_loop()) {
ChildThread::current()->message_loop()->PostTask(FROM_HERE,
- NewRunnableMethod(this, &WebMessagePortChannelImpl::QueueMessages));
+ base::Bind(&WebMessagePortChannelImpl::QueueMessages, this));
return;
}
// This message port is being sent elsewhere (perhaps to another process).
@@ -173,7 +174,7 @@ void WebMessagePortChannelImpl::Send(IPC::Message* message) {
if (MessageLoop::current() != ChildThread::current()->message_loop()) {
DCHECK(!message->is_sync());
ChildThread::current()->message_loop()->PostTask(FROM_HERE,
- NewRunnableMethod(this, &WebMessagePortChannelImpl::Send, message));
+ base::Bind(&WebMessagePortChannelImpl::Send, this, message));
return;
}

Powered by Google App Engine
This is Rietveld 408576698