Use webrtc::TaskQueueBase type instead of rtc::Thread

...for signaling and worker thread members in BaseChannel classes.

Bug: webrtc:15099
Change-Id: I83611ed2564e143aca19d0f12ce060b77eb9d2a7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325260
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41041}
diff --git a/pc/channel.cc b/pc/channel.cc
index b72f843..0024ba0 100644
--- a/pc/channel.cc
+++ b/pc/channel.cc
@@ -112,9 +112,9 @@
 }
 
 BaseChannel::BaseChannel(
-    rtc::Thread* worker_thread,
+    webrtc::TaskQueueBase* worker_thread,
     rtc::Thread* network_thread,
-    rtc::Thread* signaling_thread,
+    webrtc::TaskQueueBase* signaling_thread,
     std::unique_ptr<MediaSendChannelInterface> send_media_channel_impl,
     std::unique_ptr<MediaReceiveChannelInterface> receive_media_channel_impl,
     absl::string_view mid,
@@ -819,9 +819,9 @@
 }
 
 VoiceChannel::VoiceChannel(
-    rtc::Thread* worker_thread,
+    webrtc::TaskQueueBase* worker_thread,
     rtc::Thread* network_thread,
-    rtc::Thread* signaling_thread,
+    webrtc::TaskQueueBase* signaling_thread,
     std::unique_ptr<VoiceMediaSendChannelInterface> media_send_channel,
     std::unique_ptr<VoiceMediaReceiveChannelInterface> media_receive_channel,
     absl::string_view mid,
@@ -952,9 +952,9 @@
 }
 
 VideoChannel::VideoChannel(
-    rtc::Thread* worker_thread,
+    webrtc::TaskQueueBase* worker_thread,
     rtc::Thread* network_thread,
-    rtc::Thread* signaling_thread,
+    webrtc::TaskQueueBase* signaling_thread,
     std::unique_ptr<VideoMediaSendChannelInterface> media_send_channel,
     std::unique_ptr<VideoMediaReceiveChannelInterface> media_receive_channel,
     absl::string_view mid,
diff --git a/pc/channel.h b/pc/channel.h
index 877c628..c933091 100644
--- a/pc/channel.h
+++ b/pc/channel.h
@@ -82,9 +82,9 @@
 
   // Constructor for use when the MediaChannels are split
   BaseChannel(
-      rtc::Thread* worker_thread,
+      webrtc::TaskQueueBase* worker_thread,
       rtc::Thread* network_thread,
-      rtc::Thread* signaling_thread,
+      webrtc::TaskQueueBase* signaling_thread,
       std::unique_ptr<MediaSendChannelInterface> media_send_channel,
       std::unique_ptr<MediaReceiveChannelInterface> media_receive_channel,
       absl::string_view mid,
@@ -93,7 +93,7 @@
       rtc::UniqueRandomIdGenerator* ssrc_generator);
   virtual ~BaseChannel();
 
-  rtc::Thread* worker_thread() const { return worker_thread_; }
+  webrtc::TaskQueueBase* worker_thread() const { return worker_thread_; }
   rtc::Thread* network_thread() const { return network_thread_; }
   const std::string& mid() const override { return demuxer_criteria_.mid(); }
   // TODO(deadbeef): This is redundant; remove this.
@@ -206,7 +206,7 @@
   }
 
   bool enabled() const RTC_RUN_ON(worker_thread()) { return enabled_; }
-  rtc::Thread* signaling_thread() const { return signaling_thread_; }
+  webrtc::TaskQueueBase* signaling_thread() const { return signaling_thread_; }
 
   // Call to verify that:
   // * The required content description directions have been set.
@@ -311,9 +311,9 @@
   void DisconnectFromRtpTransport_n() RTC_RUN_ON(network_thread());
   void SignalSentPacket_n(const rtc::SentPacket& sent_packet);
 
-  rtc::Thread* const worker_thread_;
+  webrtc::TaskQueueBase* const worker_thread_;
   rtc::Thread* const network_thread_;
-  rtc::Thread* const signaling_thread_;
+  webrtc::TaskQueueBase* const signaling_thread_;
   rtc::scoped_refptr<webrtc::PendingTaskSafetyFlag> alive_;
 
   std::function<void()> on_first_packet_received_
@@ -367,9 +367,9 @@
 class VoiceChannel : public BaseChannel {
  public:
   VoiceChannel(
-      rtc::Thread* worker_thread,
+      webrtc::TaskQueueBase* worker_thread,
       rtc::Thread* network_thread,
-      rtc::Thread* signaling_thread,
+      webrtc::TaskQueueBase* signaling_thread,
       std::unique_ptr<VoiceMediaSendChannelInterface> send_channel_impl,
       std::unique_ptr<VoiceMediaReceiveChannelInterface> receive_channel_impl,
       absl::string_view mid,
@@ -437,9 +437,9 @@
 class VideoChannel : public BaseChannel {
  public:
   VideoChannel(
-      rtc::Thread* worker_thread,
+      webrtc::TaskQueueBase* worker_thread,
       rtc::Thread* network_thread,
-      rtc::Thread* signaling_thread,
+      webrtc::TaskQueueBase* signaling_thread,
       std::unique_ptr<VideoMediaSendChannelInterface> media_send_channel,
       std::unique_ptr<VideoMediaReceiveChannelInterface> media_receive_channel,
       absl::string_view mid,