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

Unified Diff: third_party/WebKit/Source/modules/peerconnection/RTCRtpReceiver.cpp

Issue 2759953003: Interface RTCRtpReceiver and RTCPeerConnection.getReceivers() added. (Closed)
Patch Set: DISALLOW_COPY_AND_ASSIGN Created 3 years, 9 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/RTCRtpReceiver.cpp
diff --git a/third_party/WebKit/Source/modules/peerconnection/RTCRtpReceiver.cpp b/third_party/WebKit/Source/modules/peerconnection/RTCRtpReceiver.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..e929cb6b097b02b5cd35cc05d06d702514c9511e
--- /dev/null
+++ b/third_party/WebKit/Source/modules/peerconnection/RTCRtpReceiver.cpp
@@ -0,0 +1,27 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "modules/peerconnection/RTCRtpReceiver.h"
+
+#include "wtf/text/WTFString.h"
+
+namespace blink {
+
+RTCRtpReceiver::RTCRtpReceiver(std::unique_ptr<WebRTCRtpReceiver> receiver,
+ MediaStreamTrack* track)
+ : m_receiver(std::move(receiver)), m_track(track) {
+ DCHECK(m_receiver);
+ DCHECK(m_track);
+ DCHECK_EQ(static_cast<String>(m_receiver->track().id()), m_track->id());
+}
+
+MediaStreamTrack* RTCRtpReceiver::track() const {
+ return m_track;
+}
+
+DEFINE_TRACE(RTCRtpReceiver) {
+ visitor->trace(m_track);
+}
+
+} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698