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

Unified Diff: webrtc/p2p/base/transportcontroller.h

Issue 1380563002: Thinning out the Transport class. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Typo Created 5 years, 3 months 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
Index: webrtc/p2p/base/transportcontroller.h
diff --git a/webrtc/p2p/base/transportcontroller.h b/webrtc/p2p/base/transportcontroller.h
index f506e01bcf770184b23c597b2c1770c8ebcd0ad3..0ea9ac8fa7463d1db7011a0bee8efc8270bc2f32 100644
--- a/webrtc/p2p/base/transportcontroller.h
+++ b/webrtc/p2p/base/transportcontroller.h
@@ -125,6 +125,11 @@ class TransportController : public sigslot::has_slots<>,
void DestroyTransport_w(const std::string& transport_name);
void DestroyAllTransports_w();
+ // Add channel to internal list and connect signals.
+ void AddChannel_w(TransportChannelImpl* channel);
+ // Remove channel from internal list.
+ void RemoveChannel_w(TransportChannelImpl* channel);
+
bool SetSslMaxProtocolVersion_w(rtc::SSLProtocolVersion version);
void SetIceConfig_w(const IceConfig& config);
void SetIceRole_w(IceRole ice_role);
@@ -152,29 +157,27 @@ class TransportController : public sigslot::has_slots<>,
bool GetStats_w(const std::string& transport_name, TransportStats* stats);
// Handlers for signals from Transport.
pthatcher1 2015/09/29 18:12:43 from TransportChannel.
- void OnTransportConnecting_w(Transport* transport);
- void OnTransportWritableState_w(Transport* transport);
- void OnTransportReceivingState_w(Transport* transport);
- void OnTransportCompleted_w(Transport* transport);
- void OnTransportFailed_w(Transport* transport);
- void OnTransportGatheringState_w(Transport* transport);
- void OnTransportCandidatesGathered_w(
- Transport* transport,
- const std::vector<Candidate>& candidates);
- void OnTransportRoleConflict_w();
+ void OnChannelWritableState_w(TransportChannel* channel);
+ void OnChannelReceivingState_w(TransportChannel* channel);
+ void OnChannelGatheringState_w(TransportChannelImpl* channel);
+ void OnChannelCandidateGathered_w(TransportChannelImpl* channel,
+ const Candidate& candidate);
+ void OnChannelRoleConflict_w(TransportChannelImpl* channel);
+ void OnChannelConnectionRemoved_w(TransportChannelImpl* channel);
void UpdateAggregateStates_w();
- bool HasChannels_w();
rtc::Thread* const signaling_thread_ = nullptr;
rtc::Thread* const worker_thread_ = nullptr;
typedef std::map<std::string, Transport*> TransportMap;
TransportMap transports_;
+ std::vector<TransportChannelImpl*> channels_;
+
PortAllocator* const port_allocator_ = nullptr;
rtc::SSLProtocolVersion ssl_max_version_ = rtc::SSL_PROTOCOL_DTLS_10;
- // Aggregate state for Transports
+ // Aggregate state for TransportChannelImpls.
IceConnectionState connection_state_ = kIceConnectionConnecting;
bool receiving_ = false;
IceGatheringState gathering_state_ = kIceGatheringNew;

Powered by Google App Engine
This is Rietveld 408576698