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

Unified Diff: content/browser/renderer_host/media/peer_connection_tracker_host.cc

Issue 1855193002: Move the call to enable the WebRTC event log from PeerConnectionFactory to PeerConnection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge with existing WebRtcEventLogHandler. Created 4 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/browser/renderer_host/media/peer_connection_tracker_host.cc
diff --git a/content/browser/renderer_host/media/peer_connection_tracker_host.cc b/content/browser/renderer_host/media/peer_connection_tracker_host.cc
index 12f6edc96d16c0f3bfc10dd9106a10ed6e527d70..6a262dd512c7ecba95437a698595ee7f80c78e25 100644
--- a/content/browser/renderer_host/media/peer_connection_tracker_host.cc
+++ b/content/browser/renderer_host/media/peer_connection_tracker_host.cc
@@ -4,6 +4,7 @@
#include "content/browser/renderer_host/media/peer_connection_tracker_host.h"
#include "base/power_monitor/power_monitor.h"
+#include "chrome/browser/media/webrtc_event_log_handler.h"
Henrik Grunell 2016/05/10 08:44:56 Not allowed. Chrome has to implement a public con
Ivo-OOO until feb 6 2016/05/12 13:23:24 Oops, good point. I will add callbacks to do this.
#include "content/browser/media/webrtc/webrtc_internals.h"
#include "content/common/media/peer_connection_tracker_messages.h"
#include "content/public/browser/render_process_host.h"
@@ -71,10 +72,25 @@ void PeerConnectionTrackerHost::OnAddPeerConnection(
info.url,
info.rtc_configuration,
info.constraints);
+ RenderProcessHost* host = RenderProcessHost::FromID(render_process_id_);
+ if (host) {
+ scoped_refptr<WebRtcEventLogHandler> webrtc_event_log_handler(
+ base::UserDataAdapter<WebRtcEventLogHandler>::Get(
+ host, WebRtcEventLogHandler::kWebRtcEventLogHandlerKey));
+ webrtc_event_log_handler->OnPeerConnectionAdded(render_process_id_,
+ info.lid);
+ }
}
void PeerConnectionTrackerHost::OnRemovePeerConnection(int lid) {
WebRTCInternals::GetInstance()->OnRemovePeerConnection(peer_pid(), lid);
+ RenderProcessHost* host = RenderProcessHost::FromID(render_process_id_);
+ if (host) {
+ scoped_refptr<WebRtcEventLogHandler> webrtc_event_log_handler(
+ base::UserDataAdapter<WebRtcEventLogHandler>::Get(
+ host, WebRtcEventLogHandler::kWebRtcEventLogHandlerKey));
+ webrtc_event_log_handler->OnPeerConnectionRemoved(render_process_id_, lid);
+ }
}
void PeerConnectionTrackerHost::OnUpdatePeerConnection(

Powered by Google App Engine
This is Rietveld 408576698