Bug 1208371 - Remove PeerIdentity from DOMMediaStream. r?mt
MozReview-Commit-ID: 5e4TxCiWwGF
--- a/dom/media/DOMMediaStream.h
+++ b/dom/media/DOMMediaStream.h
@@ -8,17 +8,16 @@
#include "ImageContainer.h"
#include "nsCycleCollectionParticipant.h"
#include "nsWrapperCache.h"
#include "StreamBuffer.h"
#include "nsIDOMWindow.h"
#include "nsIPrincipal.h"
-#include "mozilla/PeerIdentity.h"
#include "mozilla/DOMEventTargetHelper.h"
#include "PrincipalChangeObserver.h"
// GetCurrentTime is defined in winbase.h as zero argument macro forwarding to
// GetTickCount() and conflicts with NS_DECL_NSIDOMMEDIASTREAM, containing
// currentTime getter.
#ifdef GetCurrentTime
#undef GetCurrentTime
@@ -443,29 +442,16 @@ public:
nsIPrincipal* GetPrincipal() { return mPrincipal; }
/**
* Returns a principal indicating who may access video data of this stream.
* The video principal will be a combination of all live video tracks.
*/
nsIPrincipal* GetVideoPrincipal() { return mVideoPrincipal; }
- /**
- * These are used in WebRTC. A peerIdentity constrained MediaStream cannot be sent
- * across the network to anything other than a peer with the provided identity.
- * If this is set, then mPrincipal should be an instance of nsNullPrincipal.
- */
- PeerIdentity* GetPeerIdentity() const { return mPeerIdentity; }
- void SetPeerIdentity(PeerIdentity* aPeerIdentity)
- {
- mPeerIdentity = aPeerIdentity;
- }
-
-
-
// From PrincipalChangeObserver<MediaStreamTrack>.
void PrincipalChanged(MediaStreamTrack* aTrack) override;
/**
* Add a PrincipalChangeObserver to this stream.
*
* Returns true if it was successfully added.
*
@@ -685,19 +671,16 @@ private:
void NotifyPrincipalChanged();
// Principal identifying who may access the collected contents of this stream.
// If null, this stream can be used by anyone because it has no content yet.
nsCOMPtr<nsIPrincipal> mPrincipal;
// Video principal is used by video element as access is requested to its
// image data.
nsCOMPtr<nsIPrincipal> mVideoPrincipal;
nsTArray<dom::PrincipalChangeObserver<DOMMediaStream>*> mPrincipalChangeObservers;
- // this is used in gUM and WebRTC to identify peers that this stream
- // is allowed to be sent to
- RefPtr<PeerIdentity> mPeerIdentity;
CORSMode mCORSMode;
};
NS_DEFINE_STATIC_IID_ACCESSOR(DOMMediaStream,
NS_DOMMEDIASTREAM_IID)
#define NS_DOMLOCALMEDIASTREAM_IID \
{ 0xb1437260, 0xec61, 0x4dfa, \