| Index: remoting/protocol/ice_transport_channel.h
|
| diff --git a/remoting/protocol/ice_transport_channel.h b/remoting/protocol/ice_transport_channel.h
|
| index a0dd6e7b145f5ddc67fe43c349ed5bd44ad8857e..7bde3e5e1c0539fbc948b3671098b58d39a02a0d 100644
|
| --- a/remoting/protocol/ice_transport_channel.h
|
| +++ b/remoting/protocol/ice_transport_channel.h
|
| @@ -26,6 +26,8 @@ class TransportChannelImpl;
|
| namespace remoting {
|
| namespace protocol {
|
|
|
| +class TransportContext;
|
| +
|
| class IceTransportChannel : public sigslot::has_slots<> {
|
| public:
|
| class Delegate {
|
| @@ -59,14 +61,10 @@ class IceTransportChannel : public sigslot::has_slots<> {
|
|
|
| typedef base::Callback<void(scoped_ptr<P2PDatagramSocket>)> ConnectedCallback;
|
|
|
| - IceTransportChannel(cricket::PortAllocator* port_allocator,
|
| - const NetworkSettings& network_settings,
|
| - TransportRole role);
|
| + explicit IceTransportChannel(
|
| + scoped_refptr<TransportContext> transport_context);
|
| ~IceTransportChannel() override;
|
|
|
| - // Called by IceTransport when it has fresh Jingle info.
|
| - void OnCanStart();
|
| -
|
| // Connects the channel and calls the |callback| after that.
|
| void Connect(const std::string& name,
|
| Delegate* delegate,
|
| @@ -87,7 +85,9 @@ class IceTransportChannel : public sigslot::has_slots<> {
|
| bool is_connected() const;
|
|
|
| private:
|
| - void DoStart();
|
| + void OnPortAllocatorCreated(
|
| + scoped_ptr<cricket::PortAllocator> port_allocator);
|
| +
|
| void NotifyConnected();
|
|
|
| // Signal handlers for cricket::TransportChannel.
|
| @@ -107,16 +107,14 @@ class IceTransportChannel : public sigslot::has_slots<> {
|
| // Tries to connect by restarting ICE. Called by |reconnect_timer_|.
|
| void TryReconnect();
|
|
|
| - cricket::PortAllocator* port_allocator_;
|
| - NetworkSettings network_settings_;
|
| - TransportRole role_;
|
| + scoped_refptr<TransportContext> transport_context_;
|
|
|
| std::string name_;
|
| - Delegate* delegate_;
|
| + Delegate* delegate_ = nullptr;
|
| ConnectedCallback callback_;
|
| std::string ice_username_fragment_;
|
|
|
| - bool can_start_;
|
| + scoped_ptr<cricket::PortAllocator> port_allocator_;
|
|
|
| std::string remote_ice_username_fragment_;
|
| std::string remote_ice_password_;
|
|
|