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

Side by Side Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 1871533002: Change WebRTC log callback registration in browser process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Represents the browser side of the browser <--> renderer communication 5 // Represents the browser side of the browser <--> renderer communication
6 // channel. There will be one RenderProcessHost per renderer process. 6 // channel. There will be one RenderProcessHost per renderer process.
7 7
8 #include "content/browser/renderer_host/render_process_host_impl.h" 8 #include "content/browser/renderer_host/render_process_host_impl.h"
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 2043 matching lines...) Expand 10 before | Expand all | Expand 10 after
2054 } 2054 }
2055 2055
2056 void RenderProcessHostImpl::SetWebRtcLogMessageCallback( 2056 void RenderProcessHostImpl::SetWebRtcLogMessageCallback(
2057 base::Callback<void(const std::string&)> callback) { 2057 base::Callback<void(const std::string&)> callback) {
2058 #if defined(ENABLE_WEBRTC) 2058 #if defined(ENABLE_WEBRTC)
2059 BrowserMainLoop::GetInstance()->media_stream_manager()-> 2059 BrowserMainLoop::GetInstance()->media_stream_manager()->
2060 RegisterNativeLogCallback(GetID(), callback); 2060 RegisterNativeLogCallback(GetID(), callback);
2061 #endif 2061 #endif
2062 } 2062 }
2063 2063
2064 void RenderProcessHostImpl::UnsetWebRtcLogMessageCallback() {
2065 #if defined(ENABLE_WEBRTC)
2066 BrowserMainLoop::GetInstance()
2067 ->media_stream_manager()
2068 ->UnregisterNativeLogCallback(GetID());
2069 #endif
2070 }
2071
2064 RenderProcessHostImpl::WebRtcStopRtpDumpCallback 2072 RenderProcessHostImpl::WebRtcStopRtpDumpCallback
2065 RenderProcessHostImpl::StartRtpDump( 2073 RenderProcessHostImpl::StartRtpDump(
2066 bool incoming, 2074 bool incoming,
2067 bool outgoing, 2075 bool outgoing,
2068 const WebRtcRtpPacketCallback& packet_callback) { 2076 const WebRtcRtpPacketCallback& packet_callback) {
2069 if (!p2p_socket_dispatcher_host_.get()) 2077 if (!p2p_socket_dispatcher_host_.get())
2070 return WebRtcStopRtpDumpCallback(); 2078 return WebRtcStopRtpDumpCallback();
2071 2079
2072 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, 2080 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
2073 base::Bind(&P2PSocketDispatcherHost::StartRtpDump, 2081 base::Bind(&P2PSocketDispatcherHost::StartRtpDump,
(...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after
2788 2796
2789 // Skip widgets in other processes. 2797 // Skip widgets in other processes.
2790 if (rvh->GetProcess()->GetID() != GetID()) 2798 if (rvh->GetProcess()->GetID() != GetID())
2791 continue; 2799 continue;
2792 2800
2793 rvh->OnWebkitPreferencesChanged(); 2801 rvh->OnWebkitPreferencesChanged();
2794 } 2802 }
2795 } 2803 }
2796 2804
2797 } // namespace content 2805 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698