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

Unified Diff: content/renderer/pepper/pepper_platform_audio_output_dev.cc

Issue 2821203005: Add a mojo implementation of AudioOutputIPC. (Closed)
Patch Set: Fix test issues 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
Index: content/renderer/pepper/pepper_platform_audio_output_dev.cc
diff --git a/content/renderer/pepper/pepper_platform_audio_output_dev.cc b/content/renderer/pepper/pepper_platform_audio_output_dev.cc
index e13aec1e8a4cd71472781e009a154b8fe44d2657..905155d984db146332474f8faba856a3278fc879 100644
--- a/content/renderer/pepper/pepper_platform_audio_output_dev.cc
+++ b/content/renderer/pepper/pepper_platform_audio_output_dev.cc
@@ -14,16 +14,22 @@
#include "build/build_config.h"
#include "content/child/child_process.h"
#include "content/common/content_constants_internal.h"
-#include "content/common/media/audio_messages.h"
-#include "content/renderer/media/audio_message_filter.h"
+#include "content/renderer/media/audio_ipc_factory.h"
#include "content/renderer/pepper/audio_helper.h"
#include "content/renderer/pepper/pepper_audio_output_host.h"
#include "content/renderer/pepper/pepper_media_device_manager.h"
#include "content/renderer/render_frame_impl.h"
-#include "content/renderer/render_thread_impl.h"
#include "media/audio/audio_device_description.h"
#include "ppapi/shared_impl/ppb_audio_config_shared.h"
+namespace {
+#if defined(OS_WIN) || defined(OS_MACOSX)
+const int64_t kMaxAuthorizationTimeoutMs = 4000;
+#else
+const int64_t kMaxAuthorizationTimeoutMs = 0; // No timeout.
o1ka 2017/05/11 10:58:41 We may need a separate CL to remove this code dupl
Max Morin 2017/05/11 15:31:18 Yes.
+#endif
+}
+
namespace content {
// static
@@ -254,9 +260,7 @@ bool PepperPlatformAudioOutputDev::Initialize(int sample_rate,
client_ = client;
- RenderThreadImpl* const render_thread = RenderThreadImpl::current();
- ipc_ = render_thread->audio_message_filter()->CreateAudioOutputIPC(
- render_frame_id_);
+ ipc_ = AudioIPCFactory::get()->CreateAudioOutputIPC(render_frame_id_);
CHECK(ipc_);
params_.Reset(media::AudioParameters::AUDIO_PCM_LOW_LATENCY,

Powered by Google App Engine
This is Rietveld 408576698