Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(230)

Unified Diff: media/base/mock_audio_renderer_sink.h

Issue 1809093003: Moving SwitchOutputDevice out of OutputDevice interface, eliminating OutputDevice (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/base/fake_output_device.cc ('k') | media/base/mock_audio_renderer_sink.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..fa42a0ba46cb2a7344418717cc0c0df0e93cd30d 100644
--- a/media/base/mock_audio_renderer_sink.h
+++ b/media/base/mock_audio_renderer_sink.h
@@ -16,18 +16,27 @@ namespace media {
class FakeOutputDevice;
-class MockAudioRendererSink : public RestartableAudioRendererSink {
+class MockAudioRendererSink : public SwitchableAudioRendererSink {
public:
MockAudioRendererSink();
explicit MockAudioRendererSink(OutputDeviceStatus device_status);
+ MockAudioRendererSink(const std::string& device_id,
+ OutputDeviceStatus device_status);
+ MockAudioRendererSink(const std::string& device_id,
+ OutputDeviceStatus device_status,
+ const AudioParameters& device_output_params);
MOCK_METHOD0(Start, void());
MOCK_METHOD0(Stop, void());
MOCK_METHOD0(Pause, void());
MOCK_METHOD0(Play, void());
MOCK_METHOD1(SetVolume, bool(double volume));
- OutputDevice* GetOutputDevice();
+ OutputDeviceInfo GetOutputDeviceInfo();
+
+ void SwitchOutputDevice(const std::string& device_id,
+ const url::Origin& security_origin,
+ const OutputDeviceStatusCB& callback) override;
void Initialize(const AudioParameters& params,
RenderCallback* renderer) override;
AudioRendererSink::RenderCallback* callback() { return callback_; }
@@ -37,7 +46,7 @@ class MockAudioRendererSink : public RestartableAudioRendererSink {
private:
RenderCallback* callback_;
- scoped_ptr<FakeOutputDevice> output_device_;
+ OutputDeviceInfo output_device_info_;
DISALLOW_COPY_AND_ASSIGN(MockAudioRendererSink);
};
« no previous file with comments | « media/base/fake_output_device.cc ('k') | media/base/mock_audio_renderer_sink.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698