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..553e2cd34d2c86af4f13ac371cf305cbfa08b464 |
--- /dev/null |
+++ b/third_party/WebKit/Source/modules/peerconnection/RTCRtpReceiver.cpp |
@@ -0,0 +1,26 @@ |
+// 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" |
+ |
+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 { |
+ DCHECK_EQ(static_cast<String>(m_receiver->track().id()), m_track->id()); |
foolip
2017/03/29 10:07:58
Is it possible for this to stop being true after t
hbos_chromium
2017/03/29 13:50:13
Considering it takes ownership of the receiver and
|
+ return m_track; |
+} |
+ |
+DEFINE_TRACE(RTCRtpReceiver) { |
+ visitor->trace(m_track); |
+} |
+ |
+} // namespace blink |