Chromium Code Reviews| 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 40d8455f5c402a2c1a02af593bd174ab333add57..fd0afe5e008072e708f8888d4ca23fd317fad75c 100644 |
| --- a/content/renderer/media/audio_device_factory.cc |
| +++ b/content/renderer/media/audio_device_factory.cc |
| @@ -135,22 +135,14 @@ AudioDeviceFactory::NewAudioCapturerSource(int render_frame_id) { |
| } |
| // static |
| -// TODO(http://crbug.com/587461): Find a better way to check if device exists |
| -// and is authorized. |
| media::OutputDeviceInfo AudioDeviceFactory::GetOutputDeviceInfo( |
| int render_frame_id, |
| int session_id, |
| const std::string& device_id, |
| const url::Origin& security_origin) { |
| - scoped_refptr<media::AudioRendererSink> sink = NewFinalAudioRendererSink( |
| + RenderThreadImpl* render_thread = RenderThreadImpl::current(); |
|
miu
2016/05/12 21:53:06
Not sure if this happens in any unit tests, but wh
o1ka
2016/05/17 17:17:23
Done.
Now it does not happen in unit tests (and I
|
| + return render_thread->GetAudioRendererMixerManager()->GetOutputDeviceInfo( |
| render_frame_id, session_id, device_id, security_origin); |
| - |
| - const media::OutputDeviceInfo& device_info = sink->GetOutputDeviceInfo(); |
| - |
| - // TODO(olka): Cache it and reuse, http://crbug.com/586161 |
| - sink->Stop(); // Must be stopped. |
| - |
| - return device_info; |
| } |
| AudioDeviceFactory::AudioDeviceFactory() { |