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

Unified Diff: content/renderer/media/audio_device_factory.cc

Issue 11166002: Plumb render view ID from audio-related code in renderer through IPCs to AudioRendererHost in brows… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 8 years, 2 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/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 ad7968884e78c410b8e03094850e03da0efb7318..460aee5393f124bb7281716951ca811b5ac3ce23 100644
--- a/content/renderer/media/audio_device_factory.cc
+++ b/content/renderer/media/audio_device_factory.cc
@@ -8,6 +8,7 @@
#include "content/common/child_process.h"
#include "content/renderer/media/audio_input_message_filter.h"
#include "content/renderer/media/audio_message_filter.h"
+#include "content/renderer/render_thread_impl.h"
#include "media/audio/audio_input_device.h"
#include "media/audio/audio_output_device.h"
@@ -17,24 +18,28 @@ namespace content {
AudioDeviceFactory* AudioDeviceFactory::factory_ = NULL;
// static
-media::AudioRendererSink* AudioDeviceFactory::NewOutputDevice() {
+media::AudioRendererSink* AudioDeviceFactory::NewOutputDevice(
+ int render_view_id) {
media::AudioRendererSink* device = NULL;
if (factory_)
- device = factory_->CreateOutputDevice();
+ device = factory_->CreateOutputDevice(render_view_id);
return device ? device : new media::AudioOutputDevice(
- AudioMessageFilter::Get(),
+ RenderThreadImpl::current()->audio_message_filter()->
+ CreateAudioOutputIPC(render_view_id),
ChildProcess::current()->io_message_loop()->message_loop_proxy());
}
// static
-media::AudioInputDevice* AudioDeviceFactory::NewInputDevice() {
+media::AudioInputDevice* AudioDeviceFactory::NewInputDevice(
+ int render_view_id) {
media::AudioInputDevice* device = NULL;
if (factory_)
- device = factory_->CreateInputDevice();
+ device = factory_->CreateInputDevice(render_view_id);
return device ? device : new media::AudioInputDevice(
- AudioInputMessageFilter::Get(),
+ RenderThreadImpl::current()->audio_input_message_filter()->
+ CreateAudioInputIPC(render_view_id),
ChildProcess::current()->io_message_loop()->message_loop_proxy());
}

Powered by Google App Engine
This is Rietveld 408576698