OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 // | 4 // |
5 #ifndef MEDIA_BASE_MOCK_DEMUXER_HOST_H_ | 5 #ifndef MEDIA_BASE_MOCK_DEMUXER_HOST_H_ |
6 #define MEDIA_BASE_MOCK_DEMUXER_HOST_H_ | 6 #define MEDIA_BASE_MOCK_DEMUXER_HOST_H_ |
7 | 7 |
8 #include <map> | |
8 #include <string> | 9 #include <string> |
9 | 10 |
10 #include "media/base/demuxer.h" | 11 #include "media/base/demuxer.h" |
11 #include "testing/gmock/include/gmock/gmock.h" | 12 #include "testing/gmock/include/gmock/gmock.h" |
12 | 13 |
13 namespace media { | 14 namespace media { |
14 | 15 |
15 class MockDemuxerHost : public DemuxerHost { | 16 class MockDemuxerHost : public DemuxerHost { |
16 public: | 17 public: |
17 MockDemuxerHost(); | 18 MockDemuxerHost(); |
18 virtual ~MockDemuxerHost(); | 19 virtual ~MockDemuxerHost(); |
19 | 20 |
20 // DataSourceHost implementation. | 21 // DataSourceHost implementation. |
21 MOCK_METHOD1(SetTotalBytes, void(int64 total_bytes)); | 22 MOCK_METHOD1(SetTotalBytes, void(int64 total_bytes)); |
22 MOCK_METHOD2(AddBufferedByteRange, void(int64 start, int64 end)); | 23 MOCK_METHOD2(AddBufferedByteRange, void(int64 start, int64 end)); |
23 MOCK_METHOD2(AddBufferedTimeRange, void(base::TimeDelta start, | 24 MOCK_METHOD2(AddBufferedTimeRange, void(base::TimeDelta start, |
24 base::TimeDelta end)); | 25 base::TimeDelta end)); |
25 | 26 |
26 // DemuxerHost implementation. | 27 // DemuxerHost implementation. |
27 MOCK_METHOD1(OnDemuxerError, void(PipelineStatus error)); | 28 MOCK_METHOD1(OnDemuxerError, void(PipelineStatus error)); |
28 MOCK_METHOD1(SetDuration, void(base::TimeDelta duration)); | 29 MOCK_METHOD1(SetDuration, void(base::TimeDelta duration)); |
30 void AddTextStream(DemuxerStream* text_stream, | |
31 TextKind kind, | |
32 const std::string& label, | |
33 const std::string& language); | |
34 void RemoveTextStream(DemuxerStream* text_stream); | |
35 | |
36 typedef std::map<DemuxerStream*, TextTrackConfig> TextStreamMap; | |
37 TextStreamMap text_streams_; | |
acolwell GONE FROM CHROMIUM
2013/10/21 20:10:40
nit: I don't think you need the map here. The mock
Matthew Heaney (Chromium)
2013/10/23 05:09:01
Done.
| |
29 | 38 |
30 private: | 39 private: |
31 DISALLOW_COPY_AND_ASSIGN(MockDemuxerHost); | 40 DISALLOW_COPY_AND_ASSIGN(MockDemuxerHost); |
32 }; | 41 }; |
33 | 42 |
34 } // namespace media | 43 } // namespace media |
35 | 44 |
36 #endif // MEDIA_BASE_MOCK_DEMUXER_HOST_H_ | 45 #endif // MEDIA_BASE_MOCK_DEMUXER_HOST_H_ |
OLD | NEW |