1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef MEDIA_BASE_MOCK_DEMUXER_HOST_H_
6 #define MEDIA_BASE_MOCK_DEMUXER_HOST_H_
8 #include "media/base/demuxer.h"
9 #include "media/base/text_track_config.h"
10 #include "testing/gmock/include/gmock/gmock.h"
14 class MockDemuxerHost
: public DemuxerHost
{
17 virtual ~MockDemuxerHost();
19 // DataSourceHost implementation.
20 MOCK_METHOD1(SetTotalBytes
, void(int64 total_bytes
));
21 MOCK_METHOD2(AddBufferedByteRange
, void(int64 start
, int64 end
));
22 MOCK_METHOD2(AddBufferedTimeRange
, void(base::TimeDelta start
,
23 base::TimeDelta end
));
25 // DemuxerHost implementation.
26 MOCK_METHOD1(OnDemuxerError
, void(PipelineStatus error
));
27 MOCK_METHOD1(SetDuration
, void(base::TimeDelta duration
));
28 MOCK_METHOD2(AddTextStream
, void(DemuxerStream
*,
29 const TextTrackConfig
&));
30 MOCK_METHOD1(RemoveTextStream
, void(DemuxerStream
*));
33 DISALLOW_COPY_AND_ASSIGN(MockDemuxerHost
);
38 #endif // MEDIA_BASE_MOCK_DEMUXER_HOST_H_