Reland of Moving MediaStreamSignaling logic into PeerConnection. (patchset #1 id:1 of https://codereview.webrtc.org/1403633005/ )
Reason for reland:
The original CL actually didn't break browser_tests; it was
just a coincidence that it started failing.
Original issue's description:
> Revert of Moving MediaStreamSignaling logic into PeerConnection. (patchset #10 id:180001 of https://codereview.webrtc.org/1393563002/ )
>
> Reason for revert:
> Broke browser_tests on Mac. Still need to investigate the cause.
>
> Original issue's description:
> > Moving MediaStreamSignaling logic into PeerConnection.
> >
> > This needs to happen because in the future, m-lines will be offered
> > based on the set of RtpSenders/RtpReceivers, rather than the set of
> > tracks that MediaStreamSignaling knows about.
> >
> > Besides that, MediaStreamSignaling was a "glue class" without
> > a clearly defined role, so it going away is good for other
> > reasons as well.
> >
> > Committed: https://crrev.com/97c392935411398b506861601c82e31d95c591f0
> > Cr-Commit-Position: refs/heads/master@{#10268}
>
> TBR=pthatcher@webrtc.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
>
> Committed: https://crrev.com/fc648b6d934e936f4d9a32c813364b331536ec3b
> Cr-Commit-Position: refs/heads/master@{#10269}
TBR=pthatcher@webrtc.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.webrtc.org/1404473005
Cr-Commit-Position: refs/heads/master@{#10277}
diff --git a/talk/app/webrtc/statscollector.h b/talk/app/webrtc/statscollector.h
index add26c6..714f15a 100644
--- a/talk/app/webrtc/statscollector.h
+++ b/talk/app/webrtc/statscollector.h
@@ -43,6 +43,8 @@
namespace webrtc {
+class PeerConnection;
+
// Conversion function to convert candidate type string to the corresponding one
// from enum RTCStatsIceCandidateType.
const char* IceCandidateTypeToStatsType(const std::string& candidate_type);
@@ -57,9 +59,9 @@
class StatsCollector {
public:
- // The caller is responsible for ensuring that the session outlives the
+ // The caller is responsible for ensuring that the pc outlives the
// StatsCollector instance.
- explicit StatsCollector(WebRtcSession* session);
+ explicit StatsCollector(PeerConnection* pc);
virtual ~StatsCollector();
// Adds a MediaStream with tracks that can be used as a |selector| in a call
@@ -151,8 +153,8 @@
// A collection for all of our stats reports.
StatsCollection reports_;
TrackIdMap track_ids_;
- // Raw pointer to the session the statistics are gathered from.
- WebRtcSession* const session_;
+ // Raw pointer to the peer connection the statistics are gathered from.
+ PeerConnection* const pc_;
double stats_gathering_started_;
cricket::ProxyTransportMap proxy_to_transport_;