summaryrefslogtreecommitdiffstats
path: root/content/plugin/webplugin_proxy.cc
diff options
context:
space:
mode:
authorgroby@chromium.org <groby@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-19 02:13:33 +0000
committergroby@chromium.org <groby@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-19 02:13:33 +0000
commita4888371ccdbafb22e8ce8345f77dee166a6bb4f (patch)
tree82f0a844848d949809bb1f9a4bd3f6107aa7b7e7 /content/plugin/webplugin_proxy.cc
parentdc61f78b8191e72c4a3267a79066bce62c2dc8b3 (diff)
downloadchromium_src-a4888371ccdbafb22e8ce8345f77dee166a6bb4f.zip
chromium_src-a4888371ccdbafb22e8ce8345f77dee166a6bb4f.tar.gz
chromium_src-a4888371ccdbafb22e8ce8345f77dee166a6bb4f.tar.bz2
base::Bind fixes
BUG=none TEST=none Review URL: http://codereview.chromium.org/8601002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110818 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/plugin/webplugin_proxy.cc')
-rw-r--r--content/plugin/webplugin_proxy.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/content/plugin/webplugin_proxy.cc b/content/plugin/webplugin_proxy.cc
index 757e41e..c1b34c8 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();
}
}