diff options
author | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-22 04:41:23 +0000 |
---|---|---|
committer | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-22 04:41:23 +0000 |
commit | 3ebacc67d3a25d90b5348a12c3cdd1668967f497 (patch) | |
tree | 2291c2535744e56ad7cf3195590fa14ca482c643 /mojo/examples/pepper_container_app | |
parent | fa84392ac7a4fc6661642f02a53a7f87c1a42328 (diff) | |
download | chromium_src-3ebacc67d3a25d90b5348a12c3cdd1668967f497.zip chromium_src-3ebacc67d3a25d90b5348a12c3cdd1668967f497.tar.gz chromium_src-3ebacc67d3a25d90b5348a12c3cdd1668967f497.tar.bz2 |
Mojo: Fix r258773.
Fails to build with clang; ref-counted classes should have protected or
private destructors.
TBR=yzshen@chromium.org
Review URL: https://codereview.chromium.org/209393003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@258776 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'mojo/examples/pepper_container_app')
3 files changed, 8 insertions, 6 deletions
diff --git a/mojo/examples/pepper_container_app/graphics_3d_resource.cc b/mojo/examples/pepper_container_app/graphics_3d_resource.cc index 334c5ef..d354cef 100644 --- a/mojo/examples/pepper_container_app/graphics_3d_resource.cc +++ b/mojo/examples/pepper_container_app/graphics_3d_resource.cc @@ -32,10 +32,6 @@ Graphics3DResource::Graphics3DResource(PP_Instance instance) this); } -Graphics3DResource::~Graphics3DResource() { - MojoGLES2DestroyContext(context_); -} - bool Graphics3DResource::IsBoundGraphics() const { PluginInstance* plugin_instance = MojoPpapiGlobals::Get()->GetInstance(pp_instance()); @@ -151,6 +147,10 @@ uint32_t Graphics3DResource::InsertSyncPoint() { return 0; } +Graphics3DResource::~Graphics3DResource() { + MojoGLES2DestroyContext(context_); +} + void Graphics3DResource::ContextLostThunk(void* closure) { static_cast<Graphics3DResource*>(closure)->ContextLost(); } diff --git a/mojo/examples/pepper_container_app/graphics_3d_resource.h b/mojo/examples/pepper_container_app/graphics_3d_resource.h index 6359a45..482c678 100644 --- a/mojo/examples/pepper_container_app/graphics_3d_resource.h +++ b/mojo/examples/pepper_container_app/graphics_3d_resource.h @@ -19,7 +19,6 @@ class Graphics3DResource : public ppapi::Resource, public ppapi::thunk::PPB_Graphics3D_API { public: explicit Graphics3DResource(PP_Instance instance); - virtual ~Graphics3DResource(); bool IsBoundGraphics() const; void BindGraphics(); @@ -60,6 +59,8 @@ class Graphics3DResource : public ppapi::Resource, virtual uint32_t InsertSyncPoint() OVERRIDE; private: + virtual ~Graphics3DResource(); + static void ContextLostThunk(void* closure); static void DrawAnimationFrameThunk(void* closure); void ContextLost(); diff --git a/mojo/examples/pepper_container_app/mojo_ppapi_globals.cc b/mojo/examples/pepper_container_app/mojo_ppapi_globals.cc index e5b13f2..33f8717 100644 --- a/mojo/examples/pepper_container_app/mojo_ppapi_globals.cc +++ b/mojo/examples/pepper_container_app/mojo_ppapi_globals.cc @@ -31,7 +31,6 @@ class MojoPpapiGlobals::MainThreadMessageLoopResource base::MessageLoopProxy* main_thread_message_loop) : MessageLoopShared(ForMainThread()), main_thread_message_loop_(main_thread_message_loop) {} - virtual ~MainThreadMessageLoopResource() {} // ppapi::MessageLoopShared implementation. virtual void PostClosure(const tracked_objects::Location& from_here, @@ -68,6 +67,8 @@ class MojoPpapiGlobals::MainThreadMessageLoopResource } private: + virtual ~MainThreadMessageLoopResource() {} + scoped_refptr<base::MessageLoopProxy> main_thread_message_loop_; DISALLOW_COPY_AND_ASSIGN(MainThreadMessageLoopResource); }; |