diff options
author | dmichael@chromium.org <dmichael@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-07 21:45:32 +0000 |
---|---|---|
committer | dmichael@chromium.org <dmichael@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-07 21:45:32 +0000 |
commit | fa48a62baee2e842d6479d786eeb2899deb18681 (patch) | |
tree | f7c42adacc574277f60782622c00ac78a1d5f11e /webkit/plugins/ppapi/ppb_graphics_2d_impl.cc | |
parent | 83c2e233067108fb212ba4082ee02a9bff90d98d (diff) | |
download | chromium_src-fa48a62baee2e842d6479d786eeb2899deb18681.zip chromium_src-fa48a62baee2e842d6479d786eeb2899deb18681.tar.gz chromium_src-fa48a62baee2e842d6479d786eeb2899deb18681.tar.bz2 |
Convert a bunch of pepper implementation to use base::Callback.
BUG=35223
TEST=ppapi ui_tests
Review URL: http://codereview.chromium.org/8135010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104572 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/plugins/ppapi/ppb_graphics_2d_impl.cc')
-rw-r--r-- | webkit/plugins/ppapi/ppb_graphics_2d_impl.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/webkit/plugins/ppapi/ppb_graphics_2d_impl.cc b/webkit/plugins/ppapi/ppb_graphics_2d_impl.cc index bbef628..a6c12a8 100644 --- a/webkit/plugins/ppapi/ppb_graphics_2d_impl.cc +++ b/webkit/plugins/ppapi/ppb_graphics_2d_impl.cc @@ -6,6 +6,7 @@ #include <iterator> +#include "base/bind.h" #include "base/logging.h" #include "base/message_loop.h" #include "base/task.h" @@ -155,7 +156,8 @@ PPB_Graphics2D_Impl::PPB_Graphics2D_Impl(PP_Instance instance) : Resource(instance), bound_instance_(NULL), offscreen_flush_pending_(false), - is_always_opaque_(false) { + is_always_opaque_(false), + weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) { } PPB_Graphics2D_Impl::~PPB_Graphics2D_Impl() { @@ -622,9 +624,9 @@ void PPB_Graphics2D_Impl::ScheduleOffscreenCallback( offscreen_flush_pending_ = true; MessageLoop::current()->PostTask( FROM_HERE, - NewRunnableMethod(this, - &PPB_Graphics2D_Impl::ExecuteOffscreenCallback, - callback)); + base::Bind(&PPB_Graphics2D_Impl::ExecuteOffscreenCallback, + weak_ptr_factory_.GetWeakPtr(), + callback)); } void PPB_Graphics2D_Impl::ExecuteOffscreenCallback(FlushCallbackData data) { |