Chromium Code Reviews| 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..84e3a1f2968d17716b82b48504bf22477c84c6c6 100644 |
| --- a/content/browser/renderer_host/media/peer_connection_tracker_host.cc |
| +++ b/content/browser/renderer_host/media/peer_connection_tracker_host.cc |
| @@ -4,16 +4,19 @@ |
| #include "content/browser/renderer_host/media/peer_connection_tracker_host.h" |
| #include "base/power_monitor/power_monitor.h" |
| +#include "content/browser/media/webrtc/webrtc_eventlog_host.h" |
| #include "content/browser/media/webrtc/webrtc_internals.h" |
| +#include "content/browser/renderer_host/render_process_host_impl.h" |
| #include "content/common/media/peer_connection_tracker_messages.h" |
| -#include "content/public/browser/render_process_host.h" |
| namespace content { |
| -PeerConnectionTrackerHost::PeerConnectionTrackerHost(int render_process_id) |
| +PeerConnectionTrackerHost::PeerConnectionTrackerHost( |
| + int render_process_id, |
| + WebRTCEventLogHost* event_log_host) |
| : BrowserMessageFilter(PeerConnectionTrackerMsgStart), |
| - render_process_id_(render_process_id) { |
| -} |
| + render_process_id_(render_process_id), |
| + event_log_host_(event_log_host) {} |
|
tommi (sloooow) - chröme
2016/05/30 15:37:16
if the event_loc_host param must never be nullptr,
Ivo-OOO until feb 6
2016/05/31 08:18:30
Good idea, added.
|
| bool PeerConnectionTrackerHost::OnMessageReceived(const IPC::Message& message) { |
| bool handled = true; |
| @@ -71,10 +74,12 @@ void PeerConnectionTrackerHost::OnAddPeerConnection( |
| info.url, |
| info.rtc_configuration, |
| info.constraints); |
| + event_log_host_->PeerConnectionAdded(info.lid); |
| } |
| void PeerConnectionTrackerHost::OnRemovePeerConnection(int lid) { |
| WebRTCInternals::GetInstance()->OnRemovePeerConnection(peer_pid(), lid); |
| + event_log_host_->PeerConnectionRemoved(lid); |
| } |
| void PeerConnectionTrackerHost::OnUpdatePeerConnection( |