| Index: media/base/mock_audio_renderer_sink.h
|
| diff --git a/media/base/mock_audio_renderer_sink.h b/media/base/mock_audio_renderer_sink.h
|
| index 2194bc99d926165e961540ec8bb96c53d31de64b..8c48face5684288f86986071912a8a5459a8f8f9 100644
|
| --- a/media/base/mock_audio_renderer_sink.h
|
| +++ b/media/base/mock_audio_renderer_sink.h
|
| @@ -16,18 +16,42 @@ namespace media {
|
|
|
| class FakeOutputDevice;
|
|
|
| -class MockAudioRendererSink : public RestartableAudioRendererSink {
|
| +class MockAudioRendererSink : public SwitchableAudioRendererSink {
|
| public:
|
| + class FakeOutputDeviceFactory {
|
| + public:
|
| + virtual FakeOutputDevice* NewFakeOutputDevice(
|
| + const std::string& device_id) = 0;
|
| +
|
| + protected:
|
| + virtual ~FakeOutputDeviceFactory() {}
|
| + };
|
| +
|
| MockAudioRendererSink();
|
| explicit MockAudioRendererSink(OutputDeviceStatus device_status);
|
| + MockAudioRendererSink(OutputDeviceStatus device_status,
|
| + const AudioParameters& device_output_params);
|
| + MockAudioRendererSink(const std::string& device_id,
|
| + OutputDeviceStatus device_status);
|
| + MockAudioRendererSink(const std::string& device_id,
|
| + OutputDeviceStatus device_status,
|
| + const AudioParameters& device_output_params);
|
| +
|
| + // Use this constructor if you need a working implementation of
|
| + // SwitchOutputDevice(). Do not pass nullptr as |device_factory|.
|
| + MockAudioRendererSink(FakeOutputDeviceFactory* device_factory,
|
| + const std::string& device_id);
|
|
|
| MOCK_METHOD0(Start, void());
|
| MOCK_METHOD0(Stop, void());
|
| MOCK_METHOD0(Pause, void());
|
| MOCK_METHOD0(Play, void());
|
| MOCK_METHOD1(SetVolume, bool(double volume));
|
| - OutputDevice* GetOutputDevice();
|
|
|
| + OutputDevice* GetOutputDevice();
|
| + void SwitchOutputDevice(const std::string& device_id,
|
| + const url::Origin& security_origin,
|
| + const SwitchOutputDeviceCB& callback) override;
|
| void Initialize(const AudioParameters& params,
|
| RenderCallback* renderer) override;
|
| AudioRendererSink::RenderCallback* callback() { return callback_; }
|
| @@ -36,6 +60,7 @@ class MockAudioRendererSink : public RestartableAudioRendererSink {
|
| ~MockAudioRendererSink() override;
|
|
|
| private:
|
| + FakeOutputDeviceFactory* device_factory_;
|
| RenderCallback* callback_;
|
| scoped_ptr<FakeOutputDevice> output_device_;
|
|
|
|
|