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

Unified Diff: media/base/demuxer.h

Issue 9968117: Move Demuxer::set_host() to Initialize(). (Closed) Base URL: svn://chrome-svn/chrome/trunk/src
Patch Set: Created 8 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 | media/base/demuxer.cc » ('j') | media/filters/dummy_demuxer.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/demuxer.h
diff --git a/media/base/demuxer.h b/media/base/demuxer.h
index 3647a9d54505106fb160ed5061cdbd7433b133b7..323dcf73dc99b481fd2e93f8ca41c6f7c28ff773 100644
--- a/media/base/demuxer.h
+++ b/media/base/demuxer.h
@@ -34,22 +34,16 @@ class MEDIA_EXPORT DemuxerHost : public DataSourceHost {
virtual void OnDemuxerError(PipelineStatus error) = 0;
};
-class MEDIA_EXPORT Demuxer
- : public base::RefCountedThreadSafe<Demuxer> {
+class MEDIA_EXPORT Demuxer : public base::RefCountedThreadSafe<Demuxer> {
public:
Demuxer();
- // Sets the private member |host_|. This is the first method called by
- // the DemuxerHost after a demuxer is created. The host holds a strong
- // reference to the demuxer. The reference held by the host is guaranteed
- // to be released before the host object is destroyed by the pipeline.
- virtual void set_host(DemuxerHost* host);
-
// Completes initialization of the demuxer.
//
- // TODO(scherkus): pass in DemuxerHost here instead of using set_host(),
- // see http://crbug.com/111585
- virtual void Initialize(const PipelineStatusCB& status_cb) = 0;
+ // |host| holds a strong reference to the demuxer, which is guaranteed
+ // to be released before the host object is destroyed by the pipeline.
scherkus (not reviewing) 2012/04/04 02:02:03 I copied this comment from above but it confuses m
acolwell GONE FROM CHROMIUM 2012/04/04 16:01:00 I believe the original intent was to signal that a
scherkus (not reviewing) 2012/04/05 01:54:53 I think it's because we haven't used the term "str
+ virtual void Initialize(DemuxerHost* host,
+ const PipelineStatusCB& status_cb) = 0;
// The pipeline playback rate has been changed. Demuxers may implement this
// method if they need to respond to this call.
@@ -90,19 +84,10 @@ class MEDIA_EXPORT Demuxer
virtual bool IsSeekable() = 0;
protected:
- // Only allow derived objects access to the DemuxerHost. This is
- // kept out of the public interface because demuxers need to be
- // aware of all calls made to the host object so they can insure
- // the state presented to the host is always consistent with its own
- // state.
- DemuxerHost* host() { return host_; }
-
friend class base::RefCountedThreadSafe<Demuxer>;
virtual ~Demuxer();
private:
- DemuxerHost* host_;
-
DISALLOW_COPY_AND_ASSIGN(Demuxer);
};
« no previous file with comments | « no previous file | media/base/demuxer.cc » ('j') | media/filters/dummy_demuxer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698