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

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

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/RTCRtpSender.cpp
diff --git a/third_party/WebKit/Source/modules/peerconnection/RTCRtpSender.cpp b/third_party/WebKit/Source/modules/peerconnection/RTCRtpSender.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..c31fd2c73f47fcccd1e9033f7bc6c87d6ddca3ab
--- /dev/null
+++ b/third_party/WebKit/Source/modules/peerconnection/RTCRtpSender.cpp
@@ -0,0 +1,29 @@
+// 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/RTCRtpSender.h"
+
+#include "modules/mediastream/MediaStreamTrack.h"
+
+namespace blink {
+
+RTCRtpSender::RTCRtpSender(std::unique_ptr<WebRTCRtpSender> sender,
+ MediaStreamTrack* track)
+ : sender_(std::move(sender)), track_(track) {
+ DCHECK(sender_);
+ DCHECK(track_);
+}
+
+MediaStreamTrack* RTCRtpSender::track() {
+ DCHECK((track_ && sender_->Track() &&
+ sender_->Track()->Id() == static_cast<WebString>(track_->id())) ||
+ (!track_ && !sender_->Track()));
+ return track_;
+}
+
+DEFINE_TRACE(RTCRtpSender) {
+ visitor->Trace(track_);
+}
+
+} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698