diff --git a/pc/peer_connection.h b/pc/peer_connection.h index 3d22bf4fd7..376dcc0c4e 100644 --- a/pc/peer_connection.h +++ b/pc/peer_connection.h @@ -210,13 +210,11 @@ class PeerConnection : public PeerConnectionInternal, void Close() override; // PeerConnectionInternal implementation. - rtc::Thread* network_thread() const override { + rtc::Thread* network_thread() const final { return factory_->network_thread(); } - rtc::Thread* worker_thread() const override { - return factory_->worker_thread(); - } - rtc::Thread* signaling_thread() const override { + rtc::Thread* worker_thread() const final { return factory_->worker_thread(); } + rtc::Thread* signaling_thread() const final { return factory_->signaling_thread(); } diff --git a/pc/peer_connection_factory.cc b/pc/peer_connection_factory.cc index a2852bec52..9fd8b73d66 100644 --- a/pc/peer_connection_factory.cc +++ b/pc/peer_connection_factory.cc @@ -396,20 +396,6 @@ cricket::ChannelManager* PeerConnectionFactory::channel_manager() { return channel_manager_.get(); } -rtc::Thread* PeerConnectionFactory::signaling_thread() { - // This method can be called on a different thread when the factory is - // created in CreatePeerConnectionFactory(). - return signaling_thread_; -} - -rtc::Thread* PeerConnectionFactory::worker_thread() { - return worker_thread_; -} - -rtc::Thread* PeerConnectionFactory::network_thread() { - return network_thread_; -} - std::unique_ptr PeerConnectionFactory::CreateRtcEventLog_w() { RTC_DCHECK_RUN_ON(worker_thread_); diff --git a/pc/peer_connection_factory.h b/pc/peer_connection_factory.h index 99770878c6..40706cecd5 100644 --- a/pc/peer_connection_factory.h +++ b/pc/peer_connection_factory.h @@ -76,9 +76,15 @@ class PeerConnectionFactory : public PeerConnectionFactoryInterface { CreateSctpTransportInternalFactory(); virtual cricket::ChannelManager* channel_manager(); - virtual rtc::Thread* signaling_thread(); - virtual rtc::Thread* worker_thread(); - virtual rtc::Thread* network_thread(); + + rtc::Thread* signaling_thread() { + // This method can be called on a different thread when the factory is + // created in CreatePeerConnectionFactory(). + return signaling_thread_; + } + rtc::Thread* worker_thread() { return worker_thread_; } + rtc::Thread* network_thread() { return network_thread_; } + const Options& options() const { return options_; } MediaTransportFactory* media_transport_factory() {