Add RtpSenderInterface.SetStreams

This is a reland of df5731e44d510e9f23a35b77e9e102eb41919bf4 with fixes
to avoid existing chromium tests to fail.

Instead of replacing the existing RtpSender::set_stream_ids() to
also fire OnRenegotiationNeeded(), this CL keeps the old
set_stream_ids() and adds the new RtpSender::SetStreams() which sets
the stream IDs and fires the callback.

This allows existing callsites to maintain behavior, and reserve
SetStreams() for the cases when we want OnRenegotiationNeeded() to fire.

Using the SetStreams() name instead of SetStreamIDs() to match the W3C
spec and to make it more different that the existing set_stream_ids().

Original change's description:
> Improve spec compliance of SetStreamIDs in RtpSenderInterface
>
> This CL makes RtpSender::SetStreamIDs fire fire negotiationneeded
> event if needed and exposes the method on RtpSenderInterface.
>
> This is a spec-compliance change.
>
> Bug: webrtc:10129
> Change-Id: I2b98b92665c847102838b094516a79b24de0e47e
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/135121
> Commit-Queue: Guido Urdaneta <guidou@webrtc.org>
> Reviewed-by: Steve Anton <steveanton@webrtc.org>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#27974}

Bug: webrtc:10129
Change-Id: Ic0b322bfa25c157e3a39465ef8b486f898eaf6bd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/137439
Commit-Queue: Guido Urdaneta <guidou@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27992}
diff --git a/pc/peer_connection_rtp_unittest.cc b/pc/peer_connection_rtp_unittest.cc
index 6925300..6336f1f 100644
--- a/pc/peer_connection_rtp_unittest.cc
+++ b/pc/peer_connection_rtp_unittest.cc
@@ -491,15 +491,8 @@
   ASSERT_TRUE(callee->CreateAnswerAndSetAsLocal());
 
   // Change the stream ID in the offer.
-  // TODO(https://crbug.com/webrtc/10129): When RtpSenderInterface::SetStreams
-  // is supported, this can use that instead of munging the SDP.
-  auto offer = caller->CreateOffer();
-  auto contents = offer->description()->contents();
-  ASSERT_EQ(1u, contents.size());
-  auto& stream_params = contents[0].media_description()->mutable_streams();
-  ASSERT_EQ(1u, stream_params.size());
-  stream_params[0].set_stream_ids({"stream2"});
-  ASSERT_TRUE(callee->SetRemoteDescription(std::move(offer)));
+  caller->pc()->GetSenders()[0]->SetStreams({"stream2"});
+  ASSERT_TRUE(callee->SetRemoteDescription(caller->CreateOfferAndSetAsLocal()));
   ASSERT_EQ(1u, transceiver->receiver()->streams().size());
   EXPECT_EQ("stream2", transceiver->receiver()->streams()[0]->id());
 }
@@ -1797,12 +1790,7 @@
 
 // This test exercises the code path that fires a NegotiationNeeded
 // notification when the stream IDs of the local description differ from
-// the ones in the transceiver. Since SetStreams() is not yet available
-// on RtpSenderInterface, adding a track is used to trigger the check for
-// the NegotiationNeeded notification.
-// TODO(https://crbug.com/webrtc/10129): Replace this test with a test that
-// checks that calling SetStreams() on a sender fires the notification once
-// the method becomes available in RtpSenderInterface.
+// the ones in the transceiver.
 TEST_F(PeerConnectionRtpTestUnifiedPlan,
        ChangeAssociatedStreamsTriggersRenegotiation) {
   auto caller = CreatePeerConnection();
@@ -1817,18 +1805,15 @@
   ASSERT_TRUE(caller->ExchangeOfferAnswerWith(callee.get()));
   caller->observer()->clear_negotiation_needed();
 
-  SessionDescriptionInterface* cld = const_cast<SessionDescriptionInterface*>(
-      caller->pc()->current_local_description());
-  ASSERT_EQ(cld->description()->contents().size(), 1u);
-
-  cricket::SessionDescription* description = cld->description();
-  cricket::ContentInfo& content_info = description->contents()[0];
-  ASSERT_EQ(content_info.media_description()->mutable_streams().size(), 1u);
-  content_info.media_description()->mutable_streams()[0].set_stream_ids(
-      {"stream3", "stream4", "stream5"});
-
-  ASSERT_TRUE(caller->AddTrack(caller->CreateAudioTrack("a2")));
+  transceiver->sender()->SetStreams({"stream3", "stream4", "stream5"});
   EXPECT_TRUE(caller->observer()->negotiation_needed());
+
+  ASSERT_TRUE(callee->SetRemoteDescription(caller->CreateOfferAndSetAsLocal()));
+  auto callee_streams = callee->pc()->GetReceivers()[0]->streams();
+  ASSERT_EQ(3u, callee_streams.size());
+  EXPECT_EQ("stream3", callee_streams[0]->id());
+  EXPECT_EQ("stream4", callee_streams[1]->id());
+  EXPECT_EQ("stream5", callee_streams[2]->id());
 }
 
 INSTANTIATE_TEST_SUITE_P(PeerConnectionRtpTest,