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

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

Issue 2890753003: Introduce AudioIPCFactory. (Closed)
Patch Set: Dale's comments. Created 3 years, 7 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/BUILD.gn ('k') | content/renderer/media/audio_ipc_factory.h » ('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 e83ca0fab5458495eb578981cdeb9739149d8682..7f72d259d0721d20607cc252dfd8bb5961ae3336 100644
--- a/content/renderer/media/audio_device_factory.cc
+++ b/content/renderer/media/audio_device_factory.cc
@@ -11,7 +11,7 @@
#include "build/build_config.h"
#include "content/common/content_constants_internal.h"
#include "content/renderer/media/audio_input_message_filter.h"
-#include "content/renderer/media/audio_message_filter.h"
+#include "content/renderer/media/audio_ipc_factory.h"
#include "content/renderer/media/audio_renderer_mixer_manager.h"
#include "content/renderer/render_thread_impl.h"
#include "media/audio/audio_input_device.h"
@@ -43,14 +43,14 @@ scoped_refptr<media::AudioOutputDevice> NewOutputDevice(
int session_id,
const std::string& device_id,
const url::Origin& security_origin) {
- AudioMessageFilter* const filter = AudioMessageFilter::Get();
- scoped_refptr<media::AudioOutputDevice> device(new media::AudioOutputDevice(
- filter->CreateAudioOutputIPC(render_frame_id), filter->io_task_runner(),
- session_id, device_id, security_origin,
- // Set authorization request timeout at 80% of renderer hung timeout, but
- // no more than kMaxAuthorizationTimeout.
- base::TimeDelta::FromMilliseconds(std::min(kHungRendererDelayMs * 8 / 10,
- kMaxAuthorizationTimeoutMs))));
+ auto device = base::MakeRefCounted<media::AudioOutputDevice>(
+ AudioIPCFactory::get()->CreateAudioOutputIPC(render_frame_id),
+ AudioIPCFactory::get()->io_task_runner(), session_id, device_id,
+ security_origin,
+ // Set authorization request timeout at 80% of renderer hung timeout,
+ // but no more than kMaxAuthorizationTimeout.
+ base::TimeDelta::FromMilliseconds(
+ std::min(kHungRendererDelayMs * 8 / 10, kMaxAuthorizationTimeoutMs)));
device->RequestDeviceAuthorization();
return device;
}
« no previous file with comments | « content/renderer/BUILD.gn ('k') | content/renderer/media/audio_ipc_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698