Index: content/browser/renderer_host/render_process_host_impl.cc |
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc |
index 26039a4aa6850c6c5560edd45a16ebd55b4ef3be..1ef2c503570df2f592fb53be447591af04134e0a 100644 |
--- a/content/browser/renderer_host/render_process_host_impl.cc |
+++ b/content/browser/renderer_host/render_process_host_impl.cc |
@@ -807,9 +807,10 @@ void RenderProcessHostImpl::CreateMessageFilters() { |
} |
#if defined(ENABLE_WEBRTC) |
- AddFilter(new P2PSocketDispatcherHost( |
+ p2p_socket_dispatcher_host_ = new P2PSocketDispatcherHost( |
resource_context, |
- browser_context->GetRequestContextForRenderProcess(GetID()))); |
+ browser_context->GetRequestContextForRenderProcess(GetID())); |
+ AddFilter(p2p_socket_dispatcher_host_); |
#endif |
AddFilter(new TraceMessageFilter()); |
@@ -1511,6 +1512,30 @@ void RenderProcessHostImpl::SetWebRtcLogMessageCallback( |
base::Callback<void(const std::string&)> callback) { |
webrtc_log_message_callback_ = callback; |
} |
+ |
+RenderProcessHostImpl::WebRtcStopRtpDumpCallback |
+RenderProcessHostImpl::StartRtpDump( |
+ bool incoming, |
+ bool outgoing, |
+ const WebRtcRtpPacketCallback& packet_callback) { |
+ if (!p2p_socket_dispatcher_host_) |
+ return WebRtcStopRtpDumpCallback(); |
+ |
+ BrowserThread::PostTask(BrowserThread::IO, |
+ FROM_HERE, |
+ base::Bind(&P2PSocketDispatcherHost::StartRtpDump, |
+ p2p_socket_dispatcher_host_, |
+ incoming, |
+ outgoing, |
+ packet_callback)); |
+ |
+ if (stop_rtp_dump_callback_.is_null()) { |
+ stop_rtp_dump_callback_ = |
+ base::Bind(&P2PSocketDispatcherHost::StopRtpDumpOnUIThread, |
+ p2p_socket_dispatcher_host_); |
+ } |
+ return stop_rtp_dump_callback_; |
+} |
#endif |
IPC::ChannelProxy* RenderProcessHostImpl::GetChannel() { |