| Index: remoting/protocol/ice_transport.h
|
| diff --git a/remoting/protocol/ice_transport.h b/remoting/protocol/ice_transport.h
|
| index 09f7da6d5454942b5bd08cf64f2cd4808aad07d5..fc72b29d5664e3f46461a2bf2b1e336409747475 100644
|
| --- a/remoting/protocol/ice_transport.h
|
| +++ b/remoting/protocol/ice_transport.h
|
| @@ -27,16 +27,10 @@ class IceTransport : public Transport,
|
| public IceTransportChannel::Delegate,
|
| public DatagramChannelFactory {
|
| public:
|
| - // |port_allocator| must outlive the session.
|
| - IceTransport(cricket::PortAllocator* port_allocator,
|
| - const NetworkSettings& network_settings,
|
| - TransportRole role);
|
| + // |transport_context| must outlive the session.
|
| + explicit IceTransport(scoped_refptr<TransportContext> transport_context);
|
| ~IceTransport() override;
|
|
|
| - // Returns a closure that must be called before transport channels start
|
| - // connecting .
|
| - base::Closure GetCanStartClosure();
|
| -
|
| // Transport interface.
|
| void Start(EventHandler* event_handler,
|
| Authenticator* authenticator) override;
|
| @@ -47,8 +41,6 @@ class IceTransport : public Transport,
|
| private:
|
| typedef std::map<std::string, IceTransportChannel*> ChannelsMap;
|
|
|
| - void OnCanStart();
|
| -
|
| // DatagramChannelFactory interface.
|
| void CreateChannel(const std::string& name,
|
| const ChannelCreatedCallback& callback) override;
|
| @@ -76,11 +68,7 @@ class IceTransport : public Transport,
|
| // Sends transport-info message with candidates from |pending_candidates_|.
|
| void SendTransportInfo();
|
|
|
| - cricket::PortAllocator* port_allocator_;
|
| - NetworkSettings network_settings_;
|
| - TransportRole role_;
|
| -
|
| - bool can_start_ = false;
|
| + scoped_refptr<TransportContext> transport_context_;
|
|
|
| Transport::EventHandler* event_handler_ = nullptr;
|
|
|
| @@ -102,6 +90,20 @@ class IceTransport : public Transport,
|
| DISALLOW_COPY_AND_ASSIGN(IceTransport);
|
| };
|
|
|
| +class IceTransportFactory : public TransportFactory {
|
| + public:
|
| + IceTransportFactory(scoped_refptr<TransportContext> transport_context);
|
| + ~IceTransportFactory() override;
|
| +
|
| + // TransportFactory interface.
|
| + scoped_ptr<Transport> CreateTransport() override;
|
| +
|
| + private:
|
| + scoped_refptr<TransportContext> transport_context_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(IceTransportFactory);
|
| +};
|
| +
|
| } // namespace protocol
|
| } // namespace remoting
|
|
|
|
|