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

Unified Diff: media/base/pipeline.h

Issue 155713: Added reference counting to the Pipeline interface. (Closed)
Patch Set: Uploaded too much Created 11 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
« no previous file with comments | « no previous file | media/base/pipeline_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/pipeline.h
diff --git a/media/base/pipeline.h b/media/base/pipeline.h
index 83e30ef54185bf2df7dcdab78dcfe1120fcd10d3..58de36baac745dd742e7d3eb4d106c8333cfb74d 100644
--- a/media/base/pipeline.h
+++ b/media/base/pipeline.h
@@ -48,7 +48,7 @@ enum PipelineError {
// inspect the Pipeline for errors.
typedef Callback0::Type PipelineCallback;
-class Pipeline {
+class Pipeline : public base::RefCountedThreadSafe<Pipeline> {
public:
// Build a pipeline to render the given URL using the given filter factory to
// construct a filter chain. Returns true if successful, false otherwise
@@ -153,6 +153,8 @@ class Pipeline {
virtual PipelineError GetError() const = 0;
protected:
+ // Only allow ourselves to be deleted by reference counting.
+ friend class base::RefCountedThreadSafe<Pipeline>;
virtual ~Pipeline() {}
};
« no previous file with comments | « no previous file | media/base/pipeline_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698