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

Unified Diff: content/renderer/gpu/gpu_channel_host.cc

Issue 8554001: base::Bind: Convert content/renderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Test fix. 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
« no previous file with comments | « no previous file | content/renderer/gpu/transport_texture_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/gpu/gpu_channel_host.cc
diff --git a/content/renderer/gpu/gpu_channel_host.cc b/content/renderer/gpu/gpu_channel_host.cc
index d66c72a05df35b08b41a9edf19a179ec3b0eaec6..84e0dae2f847c7ccefce6664ebae4f3647171e63 100644
--- a/content/renderer/gpu/gpu_channel_host.cc
+++ b/content/renderer/gpu/gpu_channel_host.cc
@@ -4,6 +4,7 @@
#include "content/renderer/gpu/gpu_channel_host.h"
+#include "base/bind.h"
#include "base/message_loop.h"
#include "base/message_loop_proxy.h"
#include "content/common/child_process.h"
@@ -79,10 +80,8 @@ bool GpuChannelHost::MessageFilter::OnMessageReceived(
const scoped_refptr<GpuChannelHost::Listener>& listener = it->second;
listener->loop()->PostTask(
FROM_HERE,
- NewRunnableMethod(
- listener.get(),
- &GpuChannelHost::Listener::DispatchMessage,
- message));
+ base::Bind(&GpuChannelHost::Listener::DispatchMessage, listener.get(),
+ message));
}
return true;
@@ -98,9 +97,7 @@ void GpuChannelHost::MessageFilter::OnChannelError() {
const scoped_refptr<GpuChannelHost::Listener>& listener = it->second;
listener->loop()->PostTask(
FROM_HERE,
- NewRunnableMethod(
- listener.get(),
- &GpuChannelHost::Listener::DispatchError));
+ base::Bind(&GpuChannelHost::Listener::DispatchError, listener.get()));
}
listeners_.clear();
@@ -108,8 +105,7 @@ void GpuChannelHost::MessageFilter::OnChannelError() {
ChildThread* main_thread = RenderProcess::current()->main_thread();
MessageLoop* main_loop = main_thread->message_loop();
main_loop->PostTask(FROM_HERE,
- NewRunnableMethod(parent_,
- &GpuChannelHost::OnChannelError));
+ base::Bind(&GpuChannelHost::OnChannelError, parent_));
}
GpuChannelHost::GpuChannelHost()
@@ -312,19 +308,16 @@ void GpuChannelHost::AddRoute(
MessageLoopProxy* io_loop = RenderProcess::current()->io_message_loop_proxy();
io_loop->PostTask(FROM_HERE,
- NewRunnableMethod(
- channel_filter_.get(),
- &GpuChannelHost::MessageFilter::AddRoute,
- route_id, listener, MessageLoopProxy::current()));
+ base::Bind(&GpuChannelHost::MessageFilter::AddRoute,
+ channel_filter_.get(), route_id, listener,
+ MessageLoopProxy::current()));
}
void GpuChannelHost::RemoveRoute(int route_id) {
MessageLoopProxy* io_loop = RenderProcess::current()->io_message_loop_proxy();
io_loop->PostTask(FROM_HERE,
- NewRunnableMethod(
- channel_filter_.get(),
- &GpuChannelHost::MessageFilter::RemoveRoute,
- route_id));
+ base::Bind(&GpuChannelHost::MessageFilter::RemoveRoute,
+ channel_filter_.get(), route_id));
}
bool GpuChannelHost::WillGpuSwitchOccur(
« no previous file with comments | « no previous file | content/renderer/gpu/transport_texture_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698