| Index: content/renderer/media/audio_device_factory.cc
|
| diff --git a/content/renderer/media/audio_device_factory.cc b/content/renderer/media/audio_device_factory.cc
|
| index 0cd9d4cac97eb4fb61bb8de0862626eb067b0ed5..f3f7ee354901ecbbfe0d4c23f266b9e8667c7242 100644
|
| --- a/content/renderer/media/audio_device_factory.cc
|
| +++ b/content/renderer/media/audio_device_factory.cc
|
| @@ -9,6 +9,7 @@
|
| #include "content/renderer/media/audio_message_filter.h"
|
| #include "media/audio/audio_input_device.h"
|
| #include "media/audio/audio_output_device.h"
|
| +#include "url/gurl.h"
|
|
|
| namespace content {
|
|
|
| @@ -18,16 +19,46 @@ AudioDeviceFactory* AudioDeviceFactory::factory_ = NULL;
|
| // static
|
| scoped_refptr<media::AudioOutputDevice> AudioDeviceFactory::NewOutputDevice(
|
| int render_frame_id) {
|
| + return NewOutputDevice(render_frame_id, std::string(), GURL());
|
| +}
|
| +
|
| +// static
|
| +scoped_refptr<media::AudioOutputDevice> AudioDeviceFactory::NewOutputDevice(
|
| + int render_frame_id,
|
| + int session_id) {
|
| if (factory_) {
|
| media::AudioOutputDevice* const device =
|
| - factory_->CreateOutputDevice(render_frame_id);
|
| + factory_->CreateOutputDevice(render_frame_id, session_id);
|
| + if (device)
|
| + return device;
|
| + }
|
| +
|
| + AudioMessageFilter* const filter = AudioMessageFilter::Get();
|
| + scoped_refptr<media::AudioOutputDevice> device = new media::AudioOutputDevice(
|
| + filter->CreateAudioOutputIPC(render_frame_id), filter->io_task_runner(),
|
| + session_id, std::string(), GURL());
|
| + device->RequestDeviceAuthorization();
|
| + return device;
|
| +}
|
| +
|
| +// static
|
| +scoped_refptr<media::AudioOutputDevice> AudioDeviceFactory::NewOutputDevice(
|
| + int render_frame_id,
|
| + const std::string& device_id,
|
| + const GURL& security_origin) {
|
| + if (factory_) {
|
| + media::AudioOutputDevice* const device = factory_->CreateOutputDevice(
|
| + render_frame_id, device_id, security_origin);
|
| if (device)
|
| return device;
|
| }
|
|
|
| AudioMessageFilter* const filter = AudioMessageFilter::Get();
|
| - return new media::AudioOutputDevice(
|
| - filter->CreateAudioOutputIPC(render_frame_id), filter->io_task_runner());
|
| + scoped_refptr<media::AudioOutputDevice> device = new media::AudioOutputDevice(
|
| + filter->CreateAudioOutputIPC(render_frame_id), filter->io_task_runner(),
|
| + 0, device_id, security_origin);
|
| + device->RequestDeviceAuthorization();
|
| + return device;
|
| }
|
|
|
| // static
|
|
|