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

Unified Diff: webrtc/api/peerconnection_unittest.cc

Issue 1972793003: Use scoped_refptr for On(Add|Remove)Stream and OnDataChannel. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Adding "deprecated" comments. Created 4 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: webrtc/api/peerconnection_unittest.cc
diff --git a/webrtc/api/peerconnection_unittest.cc b/webrtc/api/peerconnection_unittest.cc
index 521486f98b8e8cd79d76148f661eefdfeca46143..06b7e04e6e565b7044972a8a77cdf4f8ab5915e3 100644
--- a/webrtc/api/peerconnection_unittest.cc
+++ b/webrtc/api/peerconnection_unittest.cc
@@ -241,7 +241,8 @@ class PeerConnectionTestClient : public webrtc::PeerConnectionObserver,
webrtc::PeerConnectionInterface::SignalingState new_state) override {
EXPECT_EQ(pc()->signaling_state(), new_state);
}
- void OnAddStream(MediaStreamInterface* media_stream) override {
+ void OnAddStream(
+ rtc::scoped_refptr<MediaStreamInterface> media_stream) override {
media_stream->RegisterObserver(this);
for (size_t i = 0; i < media_stream->GetVideoTracks().size(); ++i) {
const std::string id = media_stream->GetVideoTracks()[i]->id();
@@ -251,7 +252,8 @@ class PeerConnectionTestClient : public webrtc::PeerConnectionObserver,
media_stream->GetVideoTracks()[i]));
}
}
- void OnRemoveStream(MediaStreamInterface* media_stream) override {}
+ void OnRemoveStream(
+ rtc::scoped_refptr<MediaStreamInterface> media_stream) override {}
void OnRenegotiationNeeded() override {}
void OnIceConnectionChange(
webrtc::PeerConnectionInterface::IceConnectionState new_state) override {
@@ -425,7 +427,8 @@ class PeerConnectionTestClient : public webrtc::PeerConnectionObserver,
PeerConnectionInterface::RTCOfferAnswerOptions::kUndefined;
}
- void OnDataChannel(DataChannelInterface* data_channel) override {
+ void OnDataChannel(
+ rtc::scoped_refptr<DataChannelInterface> data_channel) override {
LOG(INFO) << id_ << "OnDataChannel";
data_channel_ = data_channel;
data_observer_.reset(new MockDataChannelObserver(data_channel));

Powered by Google App Engine
This is Rietveld 408576698