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

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

Issue 10790121: First step towards moving AudioDevice from content/ to media/audio. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update comments after closing ppapi bug Created 8 years, 5 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
« no previous file with comments | « content/renderer/media/audio_device_factory.h ('k') | content/renderer/media/audio_device_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ee7906ff93e592b24f91d59fe32f6fb25c24f8e4..e200b0a11ebe99bc22ff83fb54f091623799ebe4 100644
--- a/content/renderer/media/audio_device_factory.cc
+++ b/content/renderer/media/audio_device_factory.cc
@@ -7,6 +7,9 @@
#include "base/logging.h"
#include "content/common/child_process.h"
#include "content/renderer/media/audio_device.h"
+#include "content/renderer/media/audio_input_device.h"
+#include "content/renderer/media/audio_input_message_filter.h"
+#include "content/renderer/media/audio_message_filter.h"
namespace content {
@@ -14,11 +17,24 @@ namespace content {
AudioDeviceFactory* AudioDeviceFactory::factory_ = NULL;
// static
-media::AudioRendererSink* AudioDeviceFactory::Create() {
- if (factory_) {
- return factory_->CreateAudioDevice();
- }
- return new AudioDevice(
+media::AudioRendererSink* AudioDeviceFactory::NewOutputDevice() {
+ media::AudioRendererSink* device = NULL;
+ if (factory_)
+ device = factory_->CreateOutputDevice();
+
+ return device ? device : new AudioDevice(
+ AudioMessageFilter::Get(),
+ ChildProcess::current()->io_message_loop()->message_loop_proxy());
+}
+
+// static
+AudioInputDevice* AudioDeviceFactory::NewInputDevice() {
+ AudioInputDevice* device = NULL;
+ if (factory_)
+ device = factory_->CreateInputDevice();
+
+ return device ? device : new AudioInputDevice(
+ AudioInputMessageFilter::Get(),
ChildProcess::current()->io_message_loop()->message_loop_proxy());
}
« no previous file with comments | « content/renderer/media/audio_device_factory.h ('k') | content/renderer/media/audio_device_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698