| 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..6a86c5d1c6cf351f6a81cdcf11099f41dfbc1de4 100644
|
| --- a/content/browser/renderer_host/render_process_host_impl.cc
|
| +++ b/content/browser/renderer_host/render_process_host_impl.cc
|
| @@ -807,9 +807,11 @@ 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()),
|
| + GetID());
|
| + AddFilter(p2p_socket_dispatcher_host_);
|
| #endif
|
|
|
| AddFilter(new TraceMessageFilter());
|
| @@ -1511,6 +1513,34 @@ void RenderProcessHostImpl::SetWebRtcLogMessageCallback(
|
| base::Callback<void(const std::string&)> callback) {
|
| webrtc_log_message_callback_ = callback;
|
| }
|
| +
|
| +void RenderProcessHostImpl::SetWebRtcRtpPacketCallback(
|
| + const WebRtcRtpPacketCallback& callback) {
|
| + webrtc_rtp_packet_callback_ = callback;
|
| +}
|
| +
|
| +void RenderProcessHostImpl::StartRtpDump(bool incoming, bool outgoing) {
|
| + DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
| +
|
| + BrowserThread::PostTask(BrowserThread::IO,
|
| + FROM_HERE,
|
| + base::Bind(&P2PSocketDispatcherHost::StartRtpDump,
|
| + p2p_socket_dispatcher_host_,
|
| + incoming,
|
| + outgoing));
|
| +}
|
| +
|
| +void RenderProcessHostImpl::StopRtpDump(bool incoming, bool outgoing) {
|
| + DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
| +
|
| + BrowserThread::PostTask(BrowserThread::IO,
|
| + FROM_HERE,
|
| + base::Bind(&P2PSocketDispatcherHost::StopRtpDump,
|
| + p2p_socket_dispatcher_host_,
|
| + incoming,
|
| + outgoing));
|
| +}
|
| +
|
| #endif
|
|
|
| IPC::ChannelProxy* RenderProcessHostImpl::GetChannel() {
|
| @@ -1899,6 +1929,16 @@ void RenderProcessHostImpl::WebRtcLogMessage(const std::string& message) {
|
| if (!webrtc_log_message_callback_.is_null())
|
| webrtc_log_message_callback_.Run(message);
|
| }
|
| +
|
| +void RenderProcessHostImpl::OnRtpPacket(const uint8* packet_header,
|
| + size_t header_length,
|
| + size_t packet_length,
|
| + bool incoming) {
|
| + DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
| + if (!webrtc_rtp_packet_callback_.is_null())
|
| + webrtc_rtp_packet_callback_.Run(
|
| + packet_header, header_length, packet_length, incoming);
|
| +}
|
| #endif
|
|
|
| scoped_refptr<ScreenOrientationDispatcherHost>
|
|
|