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

Unified Diff: content/renderer/render_frame_impl.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/pepper/pepper_platform_audio_output_dev.cc ('k') | content/renderer/render_thread_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 3cbb83395461b145d8e178718745d496eeb30c91..4ecd2649fdba50439bc14ea50c2ffa9f06020b1d 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -117,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"
@@ -1227,6 +1228,9 @@ RenderFrameImpl::~RenderFrameImpl() {
if (input_handler_manager)
input_handler_manager->UnregisterRoutingID(GetRoutingID());
+ if (auto* factory = AudioIPCFactory::get())
+ factory->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_|
@@ -1300,6 +1304,10 @@ void RenderFrameImpl::Initialize() {
GetRoutingID(), render_view_->GetRoutingID());
}
+ // AudioIPCFactory may be null in tests.
+ if (auto* factory = AudioIPCFactory::get())
+ factory->MaybeRegisterRemoteFactory(GetRoutingID(), GetRemoteInterfaces());
+
const base::CommandLine& command_line =
*base::CommandLine::ForCurrentProcess();
if (command_line.HasSwitch(switches::kDomAutomationController))
« no previous file with comments | « content/renderer/pepper/pepper_platform_audio_output_dev.cc ('k') | content/renderer/render_thread_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698