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

Unified Diff: content/plugin/webplugin_proxy.cc

Issue 8601002: base::Bind fixes (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
« no previous file with comments | « content/plugin/webplugin_proxy.h ('k') | ui/gfx/surface/accelerated_surface_mac.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/plugin/webplugin_proxy.cc
diff --git a/content/plugin/webplugin_proxy.cc b/content/plugin/webplugin_proxy.cc
index 757e41e2c752cf067920e23f67e93fc0edd79297..c1b34c8c061c0fe11c86b553033f7c1444316761 100644
--- a/content/plugin/webplugin_proxy.cc
+++ b/content/plugin/webplugin_proxy.cc
@@ -6,6 +6,7 @@
#include "build/build_config.h"
+#include "base/bind.h"
#include "base/lazy_instance.h"
#include "base/memory/scoped_handle.h"
#include "base/shared_memory.h"
@@ -63,7 +64,7 @@ WebPluginProxy::WebPluginProxy(
transparent_(false),
windowless_buffer_index_(0),
host_render_view_routing_id_(host_render_view_routing_id),
- ALLOW_THIS_IN_INITIALIZER_LIST(runnable_method_factory_(this)) {
+ ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) {
#if defined(USE_X11)
windowless_shm_pixmaps_[0] = None;
windowless_shm_pixmaps_[1] = None;
@@ -198,8 +199,8 @@ void WebPluginProxy::InvalidateRect(const gfx::Rect& rect) {
// Invalidates caused by calls to NPN_InvalidateRect/NPN_InvalidateRgn
// need to be painted asynchronously as per the NPAPI spec.
MessageLoop::current()->PostTask(FROM_HERE,
- runnable_method_factory_.NewRunnableMethod(
- &WebPluginProxy::OnPaint, damaged_rect_));
+ base::Bind(&WebPluginProxy::OnPaint, weak_factory_.GetWeakPtr(),
+ damaged_rect_));
damaged_rect_ = gfx::Rect();
}
}
« no previous file with comments | « content/plugin/webplugin_proxy.h ('k') | ui/gfx/surface/accelerated_surface_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698