Clean up old Mojo types for media::mojom::RemotingDataStreamSender

This CL cleans up old Mojo types for
media::mojom::RemotingDataStreamSender from RemotingSenderTest
and CastRemotingSenderTest using Remote.

Bug: 955171
Change-Id: I87a63709a4063266897cb8be585eb6ee4e8d89a4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1941537
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Yuri Wiitala <miu@chromium.org>
Commit-Queue: Julie Kim <jkim@igalia.com>
Cr-Commit-Position: refs/heads/master@{#720801}
diff --git a/components/mirroring/browser/cast_remoting_sender_unittest.cc b/components/mirroring/browser/cast_remoting_sender_unittest.cc
index bc0995c..99c237f 100644
--- a/components/mirroring/browser/cast_remoting_sender_unittest.cc
+++ b/components/mirroring/browser/cast_remoting_sender_unittest.cc
@@ -15,6 +15,7 @@
 #include "media/cast/net/cast_transport.h"
 #include "media/cast/test/utility/default_config.h"
 #include "media/mojo/mojom/remoting.mojom.h"
+#include "mojo/public/cpp/bindings/remote.h"
 #include "mojo/public/cpp/system/data_pipe.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
@@ -132,7 +133,7 @@
 
     CastRemotingSender::FindAndBind(
         transport_config_.rtp_stream_id, std::move(consumer_end),
-        MakeRequest(&sender_),
+        sender_.BindNewPipeAndPassReceiver(),
         base::BindOnce(&CastRemotingSenderTest::OnError,
                        base::Unretained(this)));
 
@@ -262,7 +263,7 @@
   media::cast::CastTransportRtpConfig transport_config_;
   FakeTransport transport_;
   std::unique_ptr<CastRemotingSender> remoting_sender_;
-  media::mojom::RemotingDataStreamSenderPtr sender_;
+  mojo::Remote<media::mojom::RemotingDataStreamSender> sender_;
   mojo::ScopedDataPipeProducerHandle producer_end_;
   bool expecting_error_callback_run_;
 
diff --git a/components/mirroring/service/remoting_sender_unittest.cc b/components/mirroring/service/remoting_sender_unittest.cc
index 2c0ab3a..0ce5ba5 100644
--- a/components/mirroring/service/remoting_sender_unittest.cc
+++ b/components/mirroring/service/remoting_sender_unittest.cc
@@ -17,6 +17,7 @@
 #include "media/cast/net/cast_transport.h"
 #include "media/cast/test/utility/default_config.h"
 #include "media/mojo/mojom/remoting.mojom.h"
+#include "mojo/public/cpp/bindings/remote.h"
 #include "mojo/public/cpp/system/data_pipe.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
@@ -127,7 +128,7 @@
     receiver_ssrc_ = video_config.receiver_ssrc;
     remoting_sender_ = std::make_unique<RemotingSender>(
         cast_environment_, &transport_, video_config, std::move(consumer_end),
-        mojo::MakeRequest(&sender_),
+        sender_.BindNewPipeAndPassReceiver(),
         base::BindOnce(
             [](bool expecting_error_callback_run) {
               CHECK(expecting_error_callback_run);
@@ -254,7 +255,7 @@
   const scoped_refptr<media::cast::CastEnvironment> cast_environment_;
   FakeTransport transport_;
   std::unique_ptr<RemotingSender> remoting_sender_;
-  media::mojom::RemotingDataStreamSenderPtr sender_;
+  mojo::Remote<media::mojom::RemotingDataStreamSender> sender_;
   mojo::ScopedDataPipeProducerHandle producer_end_;
   bool expecting_error_callback_run_;
   uint32_t receiver_ssrc_;