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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 | 153 |
154 private: | 154 private: |
155 DISALLOW_COPY_AND_ASSIGN(MockAudioRenderer); | 155 DISALLOW_COPY_AND_ASSIGN(MockAudioRenderer); |
156 }; | 156 }; |
157 | 157 |
158 class MockDecryptor : public Decryptor { | 158 class MockDecryptor : public Decryptor { |
159 public: | 159 public: |
160 MockDecryptor(); | 160 MockDecryptor(); |
161 virtual ~MockDecryptor(); | 161 virtual ~MockDecryptor(); |
162 | 162 |
163 MOCK_METHOD4(GenerateKeyRequest, bool(const std::string& key_system, | 163 MOCK_METHOD0(GetMediaKeys, MediaKeys*(void)); |
164 const std::string& type, | 164 |
165 const uint8* init_data, | |
166 int init_data_length)); | |
167 MOCK_METHOD6(AddKey, void(const std::string& key_system, | |
168 const uint8* key, | |
169 int key_length, | |
170 const uint8* init_data, | |
171 int init_data_length, | |
172 const std::string& session_id)); | |
173 MOCK_METHOD2(CancelKeyRequest, void(const std::string& key_system, | |
174 const std::string& session_id)); | |
175 MOCK_METHOD2(RegisterNewKeyCB, void(StreamType stream_type, | 165 MOCK_METHOD2(RegisterNewKeyCB, void(StreamType stream_type, |
176 const NewKeyCB& new_key_cb)); | 166 const NewKeyCB& new_key_cb)); |
177 MOCK_METHOD3(Decrypt, void(StreamType stream_type, | 167 MOCK_METHOD3(Decrypt, void(StreamType stream_type, |
178 const scoped_refptr<DecoderBuffer>& encrypted, | 168 const scoped_refptr<DecoderBuffer>& encrypted, |
179 const DecryptCB& decrypt_cb)); | 169 const DecryptCB& decrypt_cb)); |
180 MOCK_METHOD1(CancelDecrypt, void(StreamType stream_type)); | 170 MOCK_METHOD1(CancelDecrypt, void(StreamType stream_type)); |
181 MOCK_METHOD2(InitializeAudioDecoder, | 171 MOCK_METHOD2(InitializeAudioDecoder, |
182 void(const AudioDecoderConfig& config, | 172 void(const AudioDecoderConfig& config, |
183 const DecoderInitCB& init_cb)); | 173 const DecoderInitCB& init_cb)); |
184 MOCK_METHOD2(InitializeVideoDecoder, | 174 MOCK_METHOD2(InitializeVideoDecoder, |
(...skipping 17 matching lines...) Expand all Loading... |
202 public: | 192 public: |
203 MockStatisticsCB(); | 193 MockStatisticsCB(); |
204 ~MockStatisticsCB(); | 194 ~MockStatisticsCB(); |
205 | 195 |
206 MOCK_METHOD1(OnStatistics, void(const media::PipelineStatistics& statistics)); | 196 MOCK_METHOD1(OnStatistics, void(const media::PipelineStatistics& statistics)); |
207 }; | 197 }; |
208 | 198 |
209 } // namespace media | 199 } // namespace media |
210 | 200 |
211 #endif // MEDIA_BASE_MOCK_FILTERS_H_ | 201 #endif // MEDIA_BASE_MOCK_FILTERS_H_ |
OLD | NEW |