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

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

Issue 1246913005: TransportController refactoring (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fixing problems with "failed" state; a channel isn't failed if it's never added a connection Created 5 years, 4 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/p2ptransportchannel.h
diff --git a/webrtc/p2p/base/p2ptransportchannel.h b/webrtc/p2p/base/p2ptransportchannel.h
index 926de95a3bffed498bb8291ed4bd80a99cb048e3..9379d69d26bf9cb1eb4e061e28d353c26cbce36a 100644
--- a/webrtc/p2p/base/p2ptransportchannel.h
+++ b/webrtc/p2p/base/p2ptransportchannel.h
@@ -54,7 +54,7 @@ class P2PTransportChannel : public TransportChannelImpl,
P2PTransportChannel(const std::string& content_name,
int component,
P2PTransport* transport,
- PortAllocator *allocator);
+ PortAllocator* allocator);
virtual ~P2PTransportChannel();
// From TransportChannelImpl:
@@ -71,7 +71,7 @@ class P2PTransportChannel : public TransportChannelImpl,
const std::string& ice_pwd);
virtual void SetRemoteIceMode(IceMode mode);
virtual void Connect();
- virtual void OnSignalingReady();
+ virtual IceGatheringState gathering_state() const { return gathering_state_; }
virtual void OnCandidate(const Candidate& candidate);
// Sets the receiving timeout in milliseconds.
// This also sets the check_receiving_delay proportionally.
@@ -168,7 +168,7 @@ class P2PTransportChannel : public TransportChannelImpl,
return allocator_sessions_.back();
}
- void Allocate();
+ void StartGatheringCandidates();
void UpdateConnectionStates();
void RequestSort();
void SortConnections();
@@ -222,10 +222,9 @@ class P2PTransportChannel : public TransportChannelImpl,
void OnCheckReceiving();
P2PTransport* transport_;
- PortAllocator *allocator_;
- rtc::Thread *worker_thread_;
+ PortAllocator* allocator_;
+ rtc::Thread* worker_thread_;
bool incoming_only_;
- bool waiting_for_signaling_;
int error_;
std::vector<PortAllocatorSession*> allocator_sessions_;
std::vector<PortInterface *> ports_;
@@ -237,6 +236,7 @@ class P2PTransportChannel : public TransportChannelImpl,
std::vector<RemoteCandidate> remote_candidates_;
bool sort_dirty_; // indicates whether another sort is needed right now
bool was_writable_;
+ bool had_connection_ = false;
pthatcher1 2015/08/25 18:40:39 Can you put a short comment explaining something l
Taylor Brandstetter 2015/08/25 20:39:54 Done.
typedef std::map<rtc::Socket::Option, int> OptionMap;
OptionMap options_;
std::string ice_ufrag_;
@@ -248,6 +248,7 @@ class P2PTransportChannel : public TransportChannelImpl,
IceRole ice_role_;
uint64 tiebreaker_;
uint32 remote_candidate_generation_;
+ IceGatheringState gathering_state_;
int check_receiving_delay_;
int receiving_timeout_;

Powered by Google App Engine
This is Rietveld 408576698