| 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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 const SetDecryptorReadyCB& set_decryptor_ready_cb, | 151 const SetDecryptorReadyCB& set_decryptor_ready_cb, |
| 152 const StatisticsCB& statistics_cb, | 152 const StatisticsCB& statistics_cb, |
| 153 const BufferingStateCB& buffering_state_cb, | 153 const BufferingStateCB& buffering_state_cb, |
| 154 const base::Closure& ended_cb, | 154 const base::Closure& ended_cb, |
| 155 const PipelineStatusCB& error_cb, | 155 const PipelineStatusCB& error_cb, |
| 156 const base::Closure& waiting_for_decryption_key_cb)); | 156 const base::Closure& waiting_for_decryption_key_cb)); |
| 157 MOCK_METHOD0(GetTimeSource, TimeSource*()); | 157 MOCK_METHOD0(GetTimeSource, TimeSource*()); |
| 158 MOCK_METHOD1(Flush, void(const base::Closure& callback)); | 158 MOCK_METHOD1(Flush, void(const base::Closure& callback)); |
| 159 MOCK_METHOD0(StartPlaying, void()); | 159 MOCK_METHOD0(StartPlaying, void()); |
| 160 MOCK_METHOD1(SetVolume, void(float volume)); | 160 MOCK_METHOD1(SetVolume, void(float volume)); |
| 161 MOCK_METHOD3(SwitchOutputDevice, |
| 162 void(const std::string& device_id, |
| 163 const GURL& security_origin, |
| 164 const base::Callback<void(int)>& callback)); |
| 161 | 165 |
| 162 private: | 166 private: |
| 163 DISALLOW_COPY_AND_ASSIGN(MockAudioRenderer); | 167 DISALLOW_COPY_AND_ASSIGN(MockAudioRenderer); |
| 164 }; | 168 }; |
| 165 | 169 |
| 166 class MockRenderer : public Renderer { | 170 class MockRenderer : public Renderer { |
| 167 public: | 171 public: |
| 168 MockRenderer(); | 172 MockRenderer(); |
| 169 virtual ~MockRenderer(); | 173 virtual ~MockRenderer(); |
| 170 | 174 |
| 171 // Renderer implementation. | 175 // Renderer implementation. |
| 172 MOCK_METHOD7(Initialize, | 176 MOCK_METHOD7(Initialize, |
| 173 void(DemuxerStreamProvider* demuxer_stream_provider, | 177 void(DemuxerStreamProvider* demuxer_stream_provider, |
| 174 const PipelineStatusCB& init_cb, | 178 const PipelineStatusCB& init_cb, |
| 175 const StatisticsCB& statistics_cb, | 179 const StatisticsCB& statistics_cb, |
| 176 const BufferingStateCB& buffering_state_cb, | 180 const BufferingStateCB& buffering_state_cb, |
| 177 const base::Closure& ended_cb, | 181 const base::Closure& ended_cb, |
| 178 const PipelineStatusCB& error_cb, | 182 const PipelineStatusCB& error_cb, |
| 179 const base::Closure& waiting_for_decryption_key_cb)); | 183 const base::Closure& waiting_for_decryption_key_cb)); |
| 180 MOCK_METHOD1(Flush, void(const base::Closure& flush_cb)); | 184 MOCK_METHOD1(Flush, void(const base::Closure& flush_cb)); |
| 181 MOCK_METHOD1(StartPlayingFrom, void(base::TimeDelta timestamp)); | 185 MOCK_METHOD1(StartPlayingFrom, void(base::TimeDelta timestamp)); |
| 182 MOCK_METHOD1(SetPlaybackRate, void(double playback_rate)); | 186 MOCK_METHOD1(SetPlaybackRate, void(double playback_rate)); |
| 183 MOCK_METHOD1(SetVolume, void(float volume)); | 187 MOCK_METHOD1(SetVolume, void(float volume)); |
| 188 MOCK_METHOD3(SwitchAudioOutputDevice, |
| 189 void(const std::string& device_id, |
| 190 const GURL& security_origin, |
| 191 const base::Callback<void(int)>& callback)); |
| 184 MOCK_METHOD0(GetMediaTime, base::TimeDelta()); | 192 MOCK_METHOD0(GetMediaTime, base::TimeDelta()); |
| 185 MOCK_METHOD0(HasAudio, bool()); | 193 MOCK_METHOD0(HasAudio, bool()); |
| 186 MOCK_METHOD0(HasVideo, bool()); | 194 MOCK_METHOD0(HasVideo, bool()); |
| 187 MOCK_METHOD2(SetCdm, | 195 MOCK_METHOD2(SetCdm, |
| 188 void(CdmContext* cdm_context, | 196 void(CdmContext* cdm_context, |
| 189 const CdmAttachedCB& cdm_attached_cb)); | 197 const CdmAttachedCB& cdm_attached_cb)); |
| 190 | 198 |
| 191 private: | 199 private: |
| 192 DISALLOW_COPY_AND_ASSIGN(MockRenderer); | 200 DISALLOW_COPY_AND_ASSIGN(MockRenderer); |
| 193 }; | 201 }; |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 MOCK_METHOD1(ResetDecoder, void(StreamType stream_type)); | 260 MOCK_METHOD1(ResetDecoder, void(StreamType stream_type)); |
| 253 MOCK_METHOD1(DeinitializeDecoder, void(StreamType stream_type)); | 261 MOCK_METHOD1(DeinitializeDecoder, void(StreamType stream_type)); |
| 254 | 262 |
| 255 private: | 263 private: |
| 256 DISALLOW_COPY_AND_ASSIGN(MockDecryptor); | 264 DISALLOW_COPY_AND_ASSIGN(MockDecryptor); |
| 257 }; | 265 }; |
| 258 | 266 |
| 259 } // namespace media | 267 } // namespace media |
| 260 | 268 |
| 261 #endif // MEDIA_BASE_MOCK_FILTERS_H_ | 269 #endif // MEDIA_BASE_MOCK_FILTERS_H_ |
| OLD | NEW |