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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 2821203005: Add a mojo implementation of AudioOutputIPC. (Closed)
Patch Set: Comments. SWITCH TO MACRO-BASED THREAD CHECKER. 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/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 2e952fd5a26a3ca6dfcdb4ca3cb40252a7a6939b..86a3d9a8b3da5989b525d0d5a726f6ff108f7d67 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -63,6 +63,7 @@
#include "content/common/frame_owner_properties.h"
#include "content/common/frame_replication_state.h"
#include "content/common/input_messages.h"
+#include "content/common/media/renderer_audio_output_stream_factory.mojom.h"
#include "content/common/navigation_params.h"
#include "content/common/page_messages.h"
#include "content/common/savable_subframe.h"
@@ -116,6 +117,7 @@
#include "content/renderer/internal_document_state_data.h"
#include "content/renderer/manifest/manifest_manager.h"
#include "content/renderer/media/audio_device_factory.h"
+#include "content/renderer/media/audio_ipc_factory.h"
#include "content/renderer/media/media_devices_listener_impl.h"
#include "content/renderer/media/media_permission_dispatcher.h"
#include "content/renderer/media/media_stream_dispatcher.h"
@@ -1223,6 +1225,9 @@ RenderFrameImpl::~RenderFrameImpl() {
if (input_handler_manager)
input_handler_manager->UnregisterRoutingID(GetRoutingID());
+ if (AudioIPCFactory::get())
+ AudioIPCFactory::get()->MaybeDeregisterRemoteFactory(GetRoutingID());
+
if (is_main_frame_) {
// Ensure the RenderView doesn't point to this object, once it is destroyed.
// TODO(nasko): Add a check that the |main_render_frame_| of |render_view_|
@@ -1296,6 +1301,12 @@ void RenderFrameImpl::Initialize() {
GetRoutingID(), render_view_->GetRoutingID());
}
+ // AudioIPCFactory may be null in tests.
+ if (AudioIPCFactory::get()) {
+ AudioIPCFactory::get()->MaybeRegisterRemoteFactory(GetRoutingID(),
+ GetRemoteInterfaces());
+ }
+
const base::CommandLine& command_line =
*base::CommandLine::ForCurrentProcess();
if (command_line.HasSwitch(switches::kDomAutomationController))

Powered by Google App Engine
This is Rietveld 408576698