Bug 1208371 - Add GetPeerIdentity() to MediaStreamTrackSource. r=mt

MozReview-Commit-ID: CsiUYQVb8LO

--HG--
extra : rebase_source : 1d9561a1db1c36b61d319321605e36df01ea1771
This commit is contained in:
Andreas Pehrson 2016-01-05 10:16:28 +08:00
Родитель eb7cd31741
Коммит 1e75696f73
1 изменённых файлов: 17 добавлений и 0 удалений

Просмотреть файл

@ -23,6 +23,7 @@ class MediaStream;
class MediaStreamGraph;
class MediaStreamTrackListener;
class PeerConnectionImpl;
class PeerIdentity;
class ProcessedMediaStream;
class RemoteSourceStreamInfo;
@ -75,6 +76,17 @@ public:
*/
virtual CORSMode GetCORSMode() const { return CORS_NONE; }
/**
* This is used in WebRTC. A peerIdentity constrained MediaStreamTrack cannot
* be sent across the network to anything other than a peer with the provided
* identity. If this is set, then GetPrincipal() should return an instance of
* nsNullPrincipal.
*
* A track's PeerIdentity is immutable and will not change during the track's
* lifetime.
*/
virtual const PeerIdentity* GetPeerIdentity() const { return nullptr; }
/**
* Indicates whether the track is remote or not per the MediaCapture and
* Streams spec.
@ -240,6 +252,11 @@ public:
*/
CORSMode GetCORSMode() const { return GetSource().GetCORSMode(); }
/**
* Get this track's PeerIdentity.
*/
const PeerIdentity* GetPeerIdentity() const { return GetSource().GetPeerIdentity(); }
MediaStreamGraph* Graph();
MediaStreamTrackSource& GetSource() const