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

Unified Diff: webrtc/call/fake_rtp_transport_controller_send.h

Issue 2834663003: Allow mocking SendSideCongestionController for Call tests. (Closed)
Patch Set: rebase 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
« no previous file with comments | « webrtc/call/call_unittest.cc ('k') | webrtc/call/rtp_transport_controller_send.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/call/fake_rtp_transport_controller_send.h
diff --git a/webrtc/call/fake_rtp_transport_controller_send.h b/webrtc/call/fake_rtp_transport_controller_send.h
new file mode 100644
index 0000000000000000000000000000000000000000..42462d906263c7ae55ad83ee7a3b5d729af33259
--- /dev/null
+++ b/webrtc/call/fake_rtp_transport_controller_send.h
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef WEBRTC_CALL_FAKE_RTP_TRANSPORT_CONTROLLER_SEND_H_
+#define WEBRTC_CALL_FAKE_RTP_TRANSPORT_CONTROLLER_SEND_H_
+
+#include "webrtc/call/rtp_transport_controller_send_interface.h"
+#include "webrtc/modules/congestion_controller/include/send_side_congestion_controller.h"
+#include "webrtc/modules/pacing/packet_router.h"
+
+namespace webrtc {
+
+class FakeRtpTransportControllerSend
+ : public RtpTransportControllerSendInterface {
+ public:
+ explicit FakeRtpTransportControllerSend(
+ SendSideCongestionController* send_side_cc)
+ : send_side_cc_(send_side_cc) {
+ RTC_DCHECK(send_side_cc);
+ }
+
+ PacketRouter* packet_router() override { return &packet_router_; }
+
+ SendSideCongestionController* send_side_cc() override {
+ return send_side_cc_;
+ }
+
+ TransportFeedbackObserver* transport_feedback_observer() override {
+ return send_side_cc_;
+ }
+
+ RtpPacketSender* packet_sender() override { return send_side_cc_->pacer(); }
+
+ private:
+ PacketRouter packet_router_;
+ SendSideCongestionController* send_side_cc_;
+};
+
+} // namespace webrtc
+
+#endif // WEBRTC_CALL_FAKE_RTP_TRANSPORT_CONTROLLER_SEND_H_
« no previous file with comments | « webrtc/call/call_unittest.cc ('k') | webrtc/call/rtp_transport_controller_send.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698