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

Unified Diff: content/public/renderer/media_stream_audio_renderer.h

Issue 1809093003: Moving SwitchOutputDevice out of OutputDevice interface, eliminating OutputDevice (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Replace RestartableAudioRendererSink with SwitchableAudioRendererSink in webmediaplayer_impl unit t… 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
Index: content/public/renderer/media_stream_audio_renderer.h
diff --git a/content/public/renderer/media_stream_audio_renderer.h b/content/public/renderer/media_stream_audio_renderer.h
index 5a5d68d3d6234171c33df2e2462e8d430e9c0402..efa6b8e4fa30f79020e13c1591b07e980dc61b87 100644
--- a/content/public/renderer/media_stream_audio_renderer.h
+++ b/content/public/renderer/media_stream_audio_renderer.h
@@ -41,6 +41,22 @@ class MediaStreamAudioRenderer
// supported.
virtual media::OutputDevice* GetOutputDevice() = 0;
+ // Attempts to switch the audio output device.
+ // Once the attempt is finished, |callback| is invoked with the
+ // result of the operation passed as a parameter. The result is a value from
+ // the media::SwitchOutputDeviceResult enum.
Guido Urdaneta 2016/03/17 17:38:23 s/media::SwitchOutputDeviceResult/media::OutputDev
o1ka 2016/03/18 10:45:40 Done.
+ // There is no guarantee about the thread where |callback| will
+ // be invoked, so users are advised to use media::BindToCurrentLoop() to
+ // ensure that |callback| runs on the correct thread.
+ // Note also that copy constructors and destructors for arguments bound to
+ // |callback| may run on arbitrary threads as |callback| is moved across
+ // threads. It is advisable to bind arguments such that they are released by
+ // |callback| when it runs in order to avoid surprises.
+ virtual void SwitchOutputDevice(
+ const std::string& device_id,
+ const url::Origin& security_origin,
+ const media::SwitchOutputDeviceCB& callback) = 0;
+
// Time stamp that reflects the current render time. Should not be updated
// when paused.
virtual base::TimeDelta GetCurrentRenderTime() const = 0;
« no previous file with comments | « no previous file | content/renderer/media/audio_device_factory.h » ('j') | content/renderer/media/audio_device_factory.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698