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_FILTERS_H_ | 5 #ifndef MEDIA_BASE_MOCK_FILTERS_H_ |
6 #define MEDIA_BASE_MOCK_FILTERS_H_ | 6 #define MEDIA_BASE_MOCK_FILTERS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 virtual ~MockVideoDecoder(); | 77 virtual ~MockVideoDecoder(); |
78 | 78 |
79 // VideoDecoder implementation. | 79 // VideoDecoder implementation. |
80 MOCK_METHOD4(Initialize, void(const VideoDecoderConfig& config, | 80 MOCK_METHOD4(Initialize, void(const VideoDecoderConfig& config, |
81 bool low_delay, | 81 bool low_delay, |
82 const PipelineStatusCB& status_cb, | 82 const PipelineStatusCB& status_cb, |
83 const OutputCB& output_cb)); | 83 const OutputCB& output_cb)); |
84 MOCK_METHOD2(Decode, void(const scoped_refptr<DecoderBuffer>& buffer, | 84 MOCK_METHOD2(Decode, void(const scoped_refptr<DecoderBuffer>& buffer, |
85 const DecodeCB&)); | 85 const DecodeCB&)); |
86 MOCK_METHOD1(Reset, void(const base::Closure&)); | 86 MOCK_METHOD1(Reset, void(const base::Closure&)); |
87 MOCK_METHOD0(Stop, void()); | |
88 MOCK_CONST_METHOD0(HasAlpha, bool()); | 87 MOCK_CONST_METHOD0(HasAlpha, bool()); |
89 | 88 |
90 private: | 89 private: |
91 DISALLOW_COPY_AND_ASSIGN(MockVideoDecoder); | 90 DISALLOW_COPY_AND_ASSIGN(MockVideoDecoder); |
92 }; | 91 }; |
93 | 92 |
94 class MockAudioDecoder : public AudioDecoder { | 93 class MockAudioDecoder : public AudioDecoder { |
95 public: | 94 public: |
96 MockAudioDecoder(); | 95 MockAudioDecoder(); |
97 virtual ~MockAudioDecoder(); | 96 virtual ~MockAudioDecoder(); |
98 | 97 |
99 // AudioDecoder implementation. | 98 // AudioDecoder implementation. |
100 MOCK_METHOD3(Initialize, | 99 MOCK_METHOD3(Initialize, |
101 void(const AudioDecoderConfig& config, | 100 void(const AudioDecoderConfig& config, |
102 const PipelineStatusCB& status_cb, | 101 const PipelineStatusCB& status_cb, |
103 const OutputCB& output_cb)); | 102 const OutputCB& output_cb)); |
104 MOCK_METHOD2(Decode, | 103 MOCK_METHOD2(Decode, |
105 void(const scoped_refptr<DecoderBuffer>& buffer, | 104 void(const scoped_refptr<DecoderBuffer>& buffer, |
106 const DecodeCB&)); | 105 const DecodeCB&)); |
107 MOCK_METHOD1(Reset, void(const base::Closure&)); | 106 MOCK_METHOD1(Reset, void(const base::Closure&)); |
108 MOCK_METHOD0(Stop, void()); | |
109 | 107 |
110 private: | 108 private: |
111 DISALLOW_COPY_AND_ASSIGN(MockAudioDecoder); | 109 DISALLOW_COPY_AND_ASSIGN(MockAudioDecoder); |
112 }; | 110 }; |
113 | 111 |
114 class MockVideoRenderer : public VideoRenderer { | 112 class MockVideoRenderer : public VideoRenderer { |
115 public: | 113 public: |
116 MockVideoRenderer(); | 114 MockVideoRenderer(); |
117 virtual ~MockVideoRenderer(); | 115 virtual ~MockVideoRenderer(); |
118 | 116 |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 public: | 209 public: |
212 MockStatisticsCB(); | 210 MockStatisticsCB(); |
213 ~MockStatisticsCB(); | 211 ~MockStatisticsCB(); |
214 | 212 |
215 MOCK_METHOD1(OnStatistics, void(const media::PipelineStatistics& statistics)); | 213 MOCK_METHOD1(OnStatistics, void(const media::PipelineStatistics& statistics)); |
216 }; | 214 }; |
217 | 215 |
218 } // namespace media | 216 } // namespace media |
219 | 217 |
220 #endif // MEDIA_BASE_MOCK_FILTERS_H_ | 218 #endif // MEDIA_BASE_MOCK_FILTERS_H_ |
OLD | NEW |