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

Unified Diff: chromecast/media/cma/pipeline/av_pipeline_impl.h

Issue 1005703002: Chromecast: use weak pointers for AvPipelineImpl callbacks on CMA thread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « no previous file | chromecast/media/cma/pipeline/av_pipeline_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/media/cma/pipeline/av_pipeline_impl.h
diff --git a/chromecast/media/cma/pipeline/av_pipeline_impl.h b/chromecast/media/cma/pipeline/av_pipeline_impl.h
index 7c917ae521030e40c7771142a336b2d7e3815555..591c87fed5502e4b260b345c6b0d6bb0b5b92132 100644
--- a/chromecast/media/cma/pipeline/av_pipeline_impl.h
+++ b/chromecast/media/cma/pipeline/av_pipeline_impl.h
@@ -10,6 +10,7 @@
#include "base/callback.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
+#include "base/memory/weak_ptr.h"
#include "base/synchronization/lock.h"
#include "base/threading/thread_checker.h"
#include "chromecast/media/cma/backend/media_component_device.h"
@@ -167,6 +168,9 @@ class AvPipelineImpl : public base::RefCountedThreadSafe<AvPipelineImpl> {
BrowserCdmCast* media_keys_;
int media_keys_callback_id_;
+ base::WeakPtr<AvPipelineImpl> weak_this_;
+ base::WeakPtrFactory<AvPipelineImpl> weak_factory_;
+
DISALLOW_COPY_AND_ASSIGN(AvPipelineImpl);
};
« no previous file with comments | « no previous file | chromecast/media/cma/pipeline/av_pipeline_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698