summaryrefslogtreecommitdiffstats
path: root/webkit/plugins/ppapi/ppb_context_3d_impl.cc
diff options
context:
space:
mode:
authordmichael@chromium.org <dmichael@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-07 21:45:32 +0000
committerdmichael@chromium.org <dmichael@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-07 21:45:32 +0000
commitfa48a62baee2e842d6479d786eeb2899deb18681 (patch)
treef7c42adacc574277f60782622c00ac78a1d5f11e /webkit/plugins/ppapi/ppb_context_3d_impl.cc
parent83c2e233067108fb212ba4082ee02a9bff90d98d (diff)
downloadchromium_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_context_3d_impl.cc')
-rw-r--r--webkit/plugins/ppapi/ppb_context_3d_impl.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/webkit/plugins/ppapi/ppb_context_3d_impl.cc b/webkit/plugins/ppapi/ppb_context_3d_impl.cc
index 544adbb..5acf56c 100644
--- a/webkit/plugins/ppapi/ppb_context_3d_impl.cc
+++ b/webkit/plugins/ppapi/ppb_context_3d_impl.cc
@@ -4,6 +4,7 @@
#include "webkit/plugins/ppapi/ppb_context_3d_impl.h"
+#include "base/bind.h"
#include "base/logging.h"
#include "base/shared_memory.h"
#include "gpu/command_buffer/client/gles2_cmd_helper.h"
@@ -72,7 +73,7 @@ PPB_Context3D_Impl::PPB_Context3D_Impl(PP_Instance instance)
transfer_buffer_id_(0),
draw_surface_(NULL),
read_surface_(NULL),
- callback_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) {
+ weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) {
}
PPB_Context3D_Impl::~PPB_Context3D_Impl() {
@@ -304,7 +305,8 @@ bool PPB_Context3D_Impl::InitRaw(PP_Config3D_Dev config,
}
platform_context_->SetContextLostCallback(
- callback_factory_.NewCallback(&PPB_Context3D_Impl::OnContextLost));
+ base::Bind(&PPB_Context3D_Impl::OnContextLost,
+ weak_ptr_factory_.GetWeakPtr()));
return true;
}