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

Unified Diff: content/common/gpu/gpu_channel_manager.cc

Issue 8572047: base::Bind() conversion for content/common/gpu and content/gpu (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: scoped_ptr<base::WPF> -> base::WPF 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 | « content/common/gpu/gpu_channel_manager.h ('k') | content/common/gpu/gpu_command_buffer_stub.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/gpu_channel_manager.cc
diff --git a/content/common/gpu/gpu_channel_manager.cc b/content/common/gpu/gpu_channel_manager.cc
index 346ff7b0a62e1db901430354e6b804f2e7b68a63..850ae2a795e5d8773b0a4b019cd743369d81463b 100644
--- a/content/common/gpu/gpu_channel_manager.cc
+++ b/content/common/gpu/gpu_channel_manager.cc
@@ -4,6 +4,7 @@
#include "content/common/gpu/gpu_channel_manager.h"
+#include "base/bind.h"
#include "content/common/child_thread.h"
#include "content/common/gpu/gpu_channel.h"
#include "content/common/gpu/gpu_messages.h"
@@ -12,7 +13,7 @@ GpuChannelManager::GpuChannelManager(ChildThread* gpu_child_thread,
GpuWatchdog* watchdog,
base::MessageLoopProxy* io_message_loop,
base::WaitableEvent* shutdown_event)
- : ALLOW_THIS_IN_INITIALIZER_LIST(method_factory_(this)),
+ : ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)),
io_message_loop_(io_message_loop),
shutdown_event_(shutdown_event),
gpu_child_thread_(gpu_child_thread),
@@ -149,8 +150,9 @@ void GpuChannelManager::OnResizeViewACK(int32 renderer_id,
void GpuChannelManager::LoseAllContexts() {
MessageLoop::current()->PostTask(
- FROM_HERE, method_factory_.NewRunnableMethod(
- &GpuChannelManager::OnLoseAllContexts));
+ FROM_HERE,
+ base::Bind(&GpuChannelManager::OnLoseAllContexts,
+ weak_factory_.GetWeakPtr()));
}
void GpuChannelManager::OnLoseAllContexts() {
« no previous file with comments | « content/common/gpu/gpu_channel_manager.h ('k') | content/common/gpu/gpu_command_buffer_stub.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698