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

Unified Diff: media/blink/webaudiosourceprovider_impl.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/output_device_info.cc ('k') | media/blink/webaudiosourceprovider_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/blink/webaudiosourceprovider_impl.h
diff --git a/media/blink/webaudiosourceprovider_impl.h b/media/blink/webaudiosourceprovider_impl.h
index 7e859db150e714f0fcacae46cb8caeaf93a7a291..b7b85812b0c8f990c8645b75d6f30c4ac259ac39 100644
--- a/media/blink/webaudiosourceprovider_impl.h
+++ b/media/blink/webaudiosourceprovider_impl.h
@@ -41,13 +41,13 @@ namespace media {
// All calls are protected by a lock.
class MEDIA_BLINK_EXPORT WebAudioSourceProviderImpl
: NON_EXPORTED_BASE(public blink::WebAudioSourceProvider),
- NON_EXPORTED_BASE(public RestartableAudioRendererSink) {
+ NON_EXPORTED_BASE(public SwitchableAudioRendererSink) {
public:
using CopyAudioCB = base::Callback<
void(scoped_ptr<AudioBus>, uint32_t delay_milliseconds, int sample_rate)>;
explicit WebAudioSourceProviderImpl(
- const scoped_refptr<RestartableAudioRendererSink>& sink);
+ const scoped_refptr<SwitchableAudioRendererSink>& sink);
// blink::WebAudioSourceProvider implementation.
void setClient(blink::WebAudioSourceProviderClient* client) override;
@@ -60,9 +60,12 @@ class MEDIA_BLINK_EXPORT WebAudioSourceProviderImpl
void Play() override;
void Pause() override;
bool SetVolume(double volume) override;
- OutputDevice* GetOutputDevice() override;
+ OutputDeviceInfo GetOutputDeviceInfo() override;
void Initialize(const AudioParameters& params,
RenderCallback* renderer) override;
+ void SwitchOutputDevice(const std::string& device_id,
+ const url::Origin& security_origin,
+ const OutputDeviceStatusCB& callback) override;
// These methods allow a client to get a copy of the rendered audio.
void SetCopyAudioCallback(const CopyAudioCB& callback);
@@ -91,7 +94,7 @@ class MEDIA_BLINK_EXPORT WebAudioSourceProviderImpl
// Where audio ends up unless overridden by |client_|.
base::Lock sink_lock_;
- const scoped_refptr<RestartableAudioRendererSink> sink_;
+ const scoped_refptr<SwitchableAudioRendererSink> sink_;
scoped_ptr<AudioBus> bus_wrapper_;
// An inner class acting as a T filter where actual data can be tapped.
« no previous file with comments | « media/base/output_device_info.cc ('k') | media/blink/webaudiosourceprovider_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698