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

Unified Diff: content/common/gpu/client/gpu_video_decode_accelerator_host.cc

Issue 10749019: VideoDecodeAccelerator now SupportsWeakPtr instead of being RefCountedThreadSafe. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 5 months 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
Index: content/common/gpu/client/gpu_video_decode_accelerator_host.cc
diff --git a/content/common/gpu/client/gpu_video_decode_accelerator_host.cc b/content/common/gpu/client/gpu_video_decode_accelerator_host.cc
index 77cdd3accac3eaa7990bca98a926fb55f8948e1c..b14579705efdd7b018354a9bfc97a071c2974639 100644
--- a/content/common/gpu/client/gpu_video_decode_accelerator_host.cc
+++ b/content/common/gpu/client/gpu_video_decode_accelerator_host.cc
@@ -117,11 +117,13 @@ void GpuVideoDecodeAcceleratorHost::Reset() {
Send(new AcceleratedVideoDecoderMsg_Reset(decoder_route_id_));
}
-void GpuVideoDecodeAcceleratorHost::Destroy() {
+void GpuVideoDecodeAcceleratorHost::Destroy(bool pass_ownership) {
DCHECK(CalledOnValidThread());
channel_->RemoveRoute(decoder_route_id_);
client_ = NULL;
Send(new AcceleratedVideoDecoderMsg_Destroy(decoder_route_id_));
+ if (pass_ownership)
+ delete this;
}
GpuVideoDecodeAcceleratorHost::~GpuVideoDecodeAcceleratorHost() {}

Powered by Google App Engine
This is Rietveld 408576698