Chromium Code Reviews| Index: third_party/WebKit/Source/modules/peerconnection/RTCRtpReceiver.h |
| diff --git a/third_party/WebKit/Source/modules/peerconnection/RTCRtpReceiver.h b/third_party/WebKit/Source/modules/peerconnection/RTCRtpReceiver.h |
| index bc47664985182b0c321569c3e5a413e6bd039a1a..d2e8b6896af865847fb997928e9b306c765fb7da 100644 |
| --- a/third_party/WebKit/Source/modules/peerconnection/RTCRtpReceiver.h |
| +++ b/third_party/WebKit/Source/modules/peerconnection/RTCRtpReceiver.h |
| @@ -5,8 +5,11 @@ |
| #ifndef RTCRtpReceiver_h |
| #define RTCRtpReceiver_h |
| +#include <map> |
| + |
| #include "bindings/core/v8/ScriptWrappable.h" |
| #include "modules/mediastream/MediaStreamTrack.h" |
| +#include "modules/peerconnection/RTCRtpContributingSource.h" |
| #include "platform/heap/GarbageCollected.h" |
| #include "platform/heap/Member.h" |
| #include "platform/heap/Visitor.h" |
| @@ -24,12 +27,31 @@ class RTCRtpReceiver final : public GarbageCollectedFinalized<RTCRtpReceiver>, |
| RTCRtpReceiver(std::unique_ptr<WebRTCRtpReceiver>, MediaStreamTrack*); |
| MediaStreamTrack* track() const; |
| + const HeapVector<Member<RTCRtpContributingSource>>& getContributingSources(); |
| + |
| + void updateSourcesIfNeeded(); |
| DECLARE_VIRTUAL_TRACE(); |
| private: |
| + void setContributingSourcesNeedsUpdating(); |
| + |
| std::unique_ptr<WebRTCRtpReceiver> m_receiver; |
| Member<MediaStreamTrack> m_track; |
| + |
| + // All contributing sources that has ever been returned by |
|
Guido Urdaneta
2017/04/06 12:54:56
s/has/have
hbos_chromium
2017/04/06 14:49:38
Done.
|
| + // |getContributingSources| that are still alive. If |updateSourcesIfNeeded| |
| + // encounters a source that already has an associate |
| + // |RTCRtpContributingSource| it will be kept up-to-date. Garbage collected |
| + // sources are automatically removed from the map. |
| + HeapHashMap<uint32_t, |
| + WeakMember<RTCRtpContributingSource>, |
| + typename DefaultHash<uint32_t>::Hash, |
| + WTF::UnsignedWithZeroKeyHashTraits<uint32_t>> |
| + m_contributingSourcesBySourceId; |
| + // The current contributing sources (|getContributingSources|). |
| + HeapVector<Member<RTCRtpContributingSource>> m_contributingSources; |
| + bool m_contributingSourcesNeedsUpdating = true; |
| }; |
| } // namespace blink |