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

Unified Diff: media/base/mock_filters.h

Issue 9968117: Move Demuxer::set_host() to Initialize(). (Closed) Base URL: svn://chrome-svn/chrome/trunk/src
Patch Set: fixes 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 | « media/base/demuxer.cc ('k') | media/base/mock_filters.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/mock_filters.h
diff --git a/media/base/mock_filters.h b/media/base/mock_filters.h
index 75058fc95e645ebd3f95abcb963d209d0d76938d..5162675ead09cdd453c99873458aa62375ff02bb 100644
--- a/media/base/mock_filters.h
+++ b/media/base/mock_filters.h
@@ -105,35 +105,22 @@ class MockDemuxer : public Demuxer {
public:
MockDemuxer();
- MOCK_METHOD1(Initialize, void(const PipelineStatusCB& cb));
- virtual void set_host(DemuxerHost* demuxer_host);
- MOCK_METHOD1(Stop, void(const base::Closure& callback));
+ // Demuxer implementation.
+ MOCK_METHOD2(Initialize, void(DemuxerHost* host, const PipelineStatusCB& cb));
MOCK_METHOD1(SetPlaybackRate, void(float playback_rate));
MOCK_METHOD2(Seek, void(base::TimeDelta time, const PipelineStatusCB& cb));
+ MOCK_METHOD1(Stop, void(const base::Closure& callback));
MOCK_METHOD0(OnAudioRendererDisabled, void());
+ MOCK_METHOD1(GetStream, scoped_refptr<DemuxerStream>(DemuxerStream::Type));
+ MOCK_CONST_METHOD0(GetStartTime, base::TimeDelta());
MOCK_METHOD0(GetBitrate, int());
MOCK_METHOD0(IsLocalSource, bool());
MOCK_METHOD0(IsSeekable, bool());
- // Demuxer implementation.
- MOCK_METHOD2(Initialize, void(DataSource* data_source,
- const base::Closure& callback));
- MOCK_METHOD1(GetStream, scoped_refptr<DemuxerStream>(DemuxerStream::Type));
- MOCK_CONST_METHOD0(GetStartTime, base::TimeDelta());
-
- // Sets the TotalBytes, BufferedBytes, & Duration values to be sent to host()
- // when set_host() is called.
- void SetTotalAndBufferedBytesAndDuration(
- int64 total_bytes, int64 buffered_bytes, const base::TimeDelta& duration);
-
protected:
virtual ~MockDemuxer();
private:
- int64 total_bytes_;
- int64 buffered_bytes_;
- base::TimeDelta duration_;
-
DISALLOW_COPY_AND_ASSIGN(MockDemuxer);
};
@@ -299,10 +286,6 @@ void RunPipelineStatusCB4(::testing::Unused, const PipelineStatusCB& status_cb,
// provided filter. Can be used when mocking the Stop() method.
void RunStopFilterCallback(const base::Closure& closure);
-ACTION_P(RunPipelineStatusCBWithError, error) {
- arg0.Run(error);
-}
-
// Helper gmock action that calls SetError() on behalf of the provided filter.
ACTION_P2(SetError, filter, error) {
filter->host()->SetError(error);
« no previous file with comments | « media/base/demuxer.cc ('k') | media/base/mock_filters.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698