Chromium Code Reviews| Index: content/renderer/media/audio_device_factory.h |
| diff --git a/content/renderer/media/audio_device_factory.h b/content/renderer/media/audio_device_factory.h |
| index e50f13978be3231dae98e6cf1a233bc8ad75f0a8..b95259ba32ffeeb9c96f6fe93772b85f0465d4c3 100644 |
| --- a/content/renderer/media/audio_device_factory.h |
| +++ b/content/renderer/media/audio_device_factory.h |
| @@ -5,10 +5,15 @@ |
| #ifndef CONTENT_RENDERER_MEDIA_AUDIO_DEVICE_FACTORY_H_ |
| #define CONTENT_RENDERER_MEDIA_AUDIO_DEVICE_FACTORY_H_ |
| +#include <string> |
| + |
| #include "base/basictypes.h" |
| +#include "base/callback.h" |
| #include "base/memory/ref_counted.h" |
| #include "content/common/content_export.h" |
| +class GURL; |
| + |
| namespace media { |
| class AudioInputDevice; |
| class AudioOutputDevice; |
| @@ -21,12 +26,30 @@ namespace content { |
| // provide specialized implementations. |
| class CONTENT_EXPORT AudioDeviceFactory { |
| public: |
| - // Creates an AudioOutputDevice using the currently registered factory. |
| + // Creates an AudioOutputDevice using the currently registered factory |
| + // and the default audio output device. |
| // |render_frame_id| refers to the RenderFrame containing the entity |
| // producing the audio. |
| static scoped_refptr<media::AudioOutputDevice> NewOutputDevice( |
|
DaleCurtis
2015/09/12 01:17:19
Do we have callers for all of these methods? I fee
Guido Urdaneta
2015/09/14 11:35:48
Done.
|
| int render_frame_id); |
| + // Creates an AudioOutputDevice. |
| + // |render_frame_id| refers to the RenderFrame containing the entity |
| + // producing the audio. |session_id| is used for the browser to select the |
| + // correct input device ID and its associated output device, if it exists. |
| + static scoped_refptr<media::AudioOutputDevice> NewOutputDevice( |
| + int render_frame_id, |
| + int session_id); |
| + |
| + // Creates an AudioOutputDevice. |
| + // |render_frame_id| refers to the RenderFrame containing the entity |
| + // producing the audio. |device_id| and |security_origin| identify the |
| + // output device to use. |
| + static scoped_refptr<media::AudioOutputDevice> NewOutputDevice( |
| + int render_frame_id, |
| + const std::string& device_id, |
| + const GURL& security_origin); |
| + |
| // Creates an AudioInputDevice using the currently registered factory. |
| // |render_frame_id| refers to the RenderFrame containing the entity |
| // consuming the audio. |
| @@ -42,6 +65,12 @@ class CONTENT_EXPORT AudioDeviceFactory { |
| // If the return value of either of these function is NULL, we fall back |
| // on the default implementation. |
| virtual media::AudioOutputDevice* CreateOutputDevice(int render_frame_id) = 0; |
| + virtual media::AudioOutputDevice* CreateOutputDevice(int render_frame_id, |
| + int session_id) = 0; |
| + virtual media::AudioOutputDevice* CreateOutputDevice( |
| + int render_frame_id, |
| + const std::string& device_id, |
| + const GURL& security_origin) = 0; |
| virtual media::AudioInputDevice* CreateInputDevice(int render_frame_id) = 0; |
| private: |