Change MockRtpSender to not inherit from RefCountedObject.

Bug: webrtc:12701
Change-Id: I415e4d6c2507398eccb163b5f6914db00ecf7e45
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256100
Auto-Submit: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36352}
This commit is contained in:
Tomas Gunnarsson 2022-03-21 17:27:03 +01:00 committed by WebRTC LUCI CQ
parent 145ff4cc45
commit af3406ed99

View File

@ -19,8 +19,12 @@
namespace webrtc {
class MockRtpSender : public rtc::RefCountedObject<RtpSenderInterface> {
class MockRtpSender : public RtpSenderInterface {
public:
static rtc::scoped_refptr<MockRtpSender> Create() {
return rtc::make_ref_counted<MockRtpSender>();
}
MOCK_METHOD(bool, SetTrack, (MediaStreamTrackInterface*), (override));
MOCK_METHOD(rtc::scoped_refptr<MediaStreamTrackInterface>,
track,
@ -42,6 +46,7 @@ class MockRtpSender : public rtc::RefCountedObject<RtpSenderInterface> {
(const, override));
};
static_assert(!std::is_abstract_v<rtc::RefCountedObject<MockRtpSender>>, "");
} // namespace webrtc
#endif // API_TEST_MOCK_RTPSENDER_H_