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

Unified Diff: remoting/protocol/webrtc_transport.h

Issue 1521883006: Add TransportContext class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « remoting/protocol/transport_context.cc ('k') | remoting/protocol/webrtc_transport.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/webrtc_transport.h
diff --git a/remoting/protocol/webrtc_transport.h b/remoting/protocol/webrtc_transport.h
index 6fc79d72f43676c7b73bbdd583ed3e0260b8819e..827d2ef8a53c5b5af03a3176d8769be8fc886d61 100644
--- a/remoting/protocol/webrtc_transport.h
+++ b/remoting/protocol/webrtc_transport.h
@@ -25,12 +25,13 @@ class FakeAudioDeviceModule;
namespace remoting {
namespace protocol {
+class TransportContext;
+
class WebrtcTransport : public Transport,
public webrtc::PeerConnectionObserver {
public:
WebrtcTransport(rtc::Thread* worker_thread,
- PortAllocatorFactory* port_allocator_factory,
- TransportRole role);
+ scoped_refptr<TransportContext> transport_context);
~WebrtcTransport() override;
webrtc::PeerConnectionInterface* peer_connection() {
@@ -49,6 +50,9 @@ class WebrtcTransport : public Transport,
WebrtcTransport* AsWebrtcTransport() override;
private:
+ void OnPortAllocatorCreated(
+ scoped_ptr<cricket::PortAllocator> port_allocator);
+
void OnLocalSessionDescriptionCreated(
scoped_ptr<webrtc::SessionDescriptionInterface> description,
const std::string& error);
@@ -80,8 +84,7 @@ class WebrtcTransport : public Transport,
base::ThreadChecker thread_checker_;
- PortAllocatorFactory* port_allocator_factory_;
- TransportRole role_;
+ scoped_refptr<TransportContext> transport_context_;
EventHandler* event_handler_ = nullptr;
rtc::Thread* worker_thread_;
@@ -110,11 +113,8 @@ class WebrtcTransport : public Transport,
class WebrtcTransportFactory : public TransportFactory {
public:
- WebrtcTransportFactory(
- rtc::Thread* worker_thread,
- SignalStrategy* signal_strategy,
- scoped_ptr<PortAllocatorFactory> port_allocator_factory,
- TransportRole role);
+ WebrtcTransportFactory(rtc::Thread* worker_thread,
+ scoped_refptr<TransportContext> transport_context);
~WebrtcTransportFactory() override;
// TransportFactory interface.
@@ -122,9 +122,7 @@ class WebrtcTransportFactory : public TransportFactory {
private:
rtc::Thread* worker_thread_;
- SignalStrategy* signal_strategy_;
- scoped_ptr<PortAllocatorFactory> port_allocator_factory_;
- TransportRole role_;
+ scoped_refptr<TransportContext> transport_context_;
DISALLOW_COPY_AND_ASSIGN(WebrtcTransportFactory);
};
« no previous file with comments | « remoting/protocol/transport_context.cc ('k') | remoting/protocol/webrtc_transport.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698