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

Unified Diff: third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.h

Issue 2749703005: RTCRtpSender with track behind RuntimeEnabled flag (Closed)
Patch Set: external/wpt/webrtc/RTCPeerConnection-idl-expected.txt updated passing 2 more tests Created 3 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: third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.h
diff --git a/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.h b/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.h
index d90e3146dd8126c6cee679a903c2e3fd2565b41c..765b7e478b7d899c8bab5b3981751157a56755bf 100644
--- a/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.h
+++ b/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.h
@@ -58,6 +58,7 @@ class RTCIceCandidateInitOrRTCIceCandidate;
class RTCOfferOptions;
class RTCPeerConnectionErrorCallback;
class RTCRtpReceiver;
+class RTCRtpSender;
class RTCSessionDescription;
class RTCSessionDescriptionCallback;
class RTCSessionDescriptionInit;
@@ -150,6 +151,7 @@ class RTCPeerConnection final : public EventTargetWithInlineData,
MediaStreamTrack* selector = nullptr);
ScriptPromise getStats(ScriptState*);
+ HeapVector<Member<RTCRtpSender>> getSenders();
HeapVector<Member<RTCRtpReceiver>> getReceivers();
RTCDataChannel* createDataChannel(ScriptState*,
@@ -227,11 +229,13 @@ class RTCPeerConnection final : public EventTargetWithInlineData,
void ScheduleDispatchEvent(Event*);
void ScheduleDispatchEvent(Event*, std::unique_ptr<BoolFunction>);
void DispatchScheduledEvent();
- bool HasLocalStreamWithTrackId(const String& track_id);
+ MediaStreamTrack* GetLocalTrackById(const String& track_id) const;
MediaStreamTrack* GetRemoteTrackById(const String& track_id) const;
- // Receivers returned by the handler are in use by the peer connection, a
- // receiver that is no longer in use is permanently inactive and does not need
- // to be referenced anymore. Removes such receivers from |m_rtpReceivers|.
+ // Senders and receivers returned by the handler are in use by the peer
+ // connection, a sender or receiver that is no longer in use is permanently
+ // inactive and does not need to be referenced anymore. These methods removes
+ // such senders/receivers from |rtp_senders_|/|rtp_receivers_|.
+ void RemoveInactiveSenders();
void RemoveInactiveReceivers();
void ChangeSignalingState(WebRTCPeerConnectionHandlerClient::SignalingState);
@@ -259,6 +263,7 @@ class RTCPeerConnection final : public EventTargetWithInlineData,
// relevant events. https://crbug.com/705901
MediaStreamVector local_streams_;
MediaStreamVector remote_streams_;
+ HeapHashMap<uintptr_t, Member<RTCRtpSender>> rtp_senders_;
HeapHashMap<uintptr_t, Member<RTCRtpReceiver>> rtp_receivers_;
std::unique_ptr<WebRTCPeerConnectionHandler> peer_handler_;

Powered by Google App Engine
This is Rietveld 408576698