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

Unified Diff: remoting/protocol/ice_transport_channel.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/ice_transport.cc ('k') | remoting/protocol/ice_transport_channel.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
« no previous file with comments | « remoting/protocol/ice_transport.cc ('k') | remoting/protocol/ice_transport_channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698