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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 DISALLOW_COPY_AND_ASSIGN(MockDemuxerStream); | 79 DISALLOW_COPY_AND_ASSIGN(MockDemuxerStream); |
80 }; | 80 }; |
81 | 81 |
82 class MockVideoDecoder : public VideoDecoder { | 82 class MockVideoDecoder : public VideoDecoder { |
83 public: | 83 public: |
84 MockVideoDecoder(); | 84 MockVideoDecoder(); |
85 virtual ~MockVideoDecoder(); | 85 virtual ~MockVideoDecoder(); |
86 | 86 |
87 // VideoDecoder implementation. | 87 // VideoDecoder implementation. |
88 virtual std::string GetDisplayName() const; | 88 virtual std::string GetDisplayName() const; |
89 MOCK_METHOD4(Initialize, | 89 MOCK_METHOD5(Initialize, |
90 void(const VideoDecoderConfig& config, | 90 void(const VideoDecoderConfig& config, |
91 bool low_delay, | 91 bool low_delay, |
| 92 const SetCdmReadyCB& set_cdm_ready_cb, |
92 const InitCB& init_cb, | 93 const InitCB& init_cb, |
93 const OutputCB& output_cb)); | 94 const OutputCB& output_cb)); |
94 MOCK_METHOD2(Decode, void(const scoped_refptr<DecoderBuffer>& buffer, | 95 MOCK_METHOD2(Decode, void(const scoped_refptr<DecoderBuffer>& buffer, |
95 const DecodeCB&)); | 96 const DecodeCB&)); |
96 MOCK_METHOD1(Reset, void(const base::Closure&)); | 97 MOCK_METHOD1(Reset, void(const base::Closure&)); |
97 MOCK_CONST_METHOD0(HasAlpha, bool()); | 98 MOCK_CONST_METHOD0(HasAlpha, bool()); |
98 | 99 |
99 private: | 100 private: |
100 DISALLOW_COPY_AND_ASSIGN(MockVideoDecoder); | 101 DISALLOW_COPY_AND_ASSIGN(MockVideoDecoder); |
101 }; | 102 }; |
102 | 103 |
103 class MockAudioDecoder : public AudioDecoder { | 104 class MockAudioDecoder : public AudioDecoder { |
104 public: | 105 public: |
105 MockAudioDecoder(); | 106 MockAudioDecoder(); |
106 virtual ~MockAudioDecoder(); | 107 virtual ~MockAudioDecoder(); |
107 | 108 |
108 // AudioDecoder implementation. | 109 // AudioDecoder implementation. |
109 virtual std::string GetDisplayName() const; | 110 virtual std::string GetDisplayName() const; |
110 MOCK_METHOD3(Initialize, | 111 MOCK_METHOD4(Initialize, |
111 void(const AudioDecoderConfig& config, | 112 void(const AudioDecoderConfig& config, |
| 113 const SetCdmReadyCB& set_cdm_ready_cb, |
112 const InitCB& init_cb, | 114 const InitCB& init_cb, |
113 const OutputCB& output_cb)); | 115 const OutputCB& output_cb)); |
114 MOCK_METHOD2(Decode, | 116 MOCK_METHOD2(Decode, |
115 void(const scoped_refptr<DecoderBuffer>& buffer, | 117 void(const scoped_refptr<DecoderBuffer>& buffer, |
116 const DecodeCB&)); | 118 const DecodeCB&)); |
117 MOCK_METHOD1(Reset, void(const base::Closure&)); | 119 MOCK_METHOD1(Reset, void(const base::Closure&)); |
118 | 120 |
119 private: | 121 private: |
120 DISALLOW_COPY_AND_ASSIGN(MockAudioDecoder); | 122 DISALLOW_COPY_AND_ASSIGN(MockAudioDecoder); |
121 }; | 123 }; |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 MOCK_METHOD0(GetDecryptor, Decryptor*()); | 271 MOCK_METHOD0(GetDecryptor, Decryptor*()); |
270 int GetCdmId() const override; | 272 int GetCdmId() const override; |
271 | 273 |
272 private: | 274 private: |
273 DISALLOW_COPY_AND_ASSIGN(MockCdmContext); | 275 DISALLOW_COPY_AND_ASSIGN(MockCdmContext); |
274 }; | 276 }; |
275 | 277 |
276 } // namespace media | 278 } // namespace media |
277 | 279 |
278 #endif // MEDIA_BASE_MOCK_FILTERS_H_ | 280 #endif // MEDIA_BASE_MOCK_FILTERS_H_ |
OLD | NEW |