Chromium Code Reviews| Index: webrtc/p2p/base/portallocator.h |
| diff --git a/webrtc/p2p/base/portallocator.h b/webrtc/p2p/base/portallocator.h |
| index 7d2a59f278ccb307ce0266ef89f65234eb291768..d16cbd853b060a491b7b0c7ab2729e7addae50d2 100644 |
| --- a/webrtc/p2p/base/portallocator.h |
| +++ b/webrtc/p2p/base/portallocator.h |
| @@ -23,6 +23,11 @@ |
| #include "webrtc/base/sigslot.h" |
| #include "webrtc/base/thread.h" |
| +namespace rtc { |
| +class Network; |
| +class NetworkManager; |
| +} // namespace rtc |
|
Taylor Brandstetter
2016/06/21 23:36:12
Is this still needed?
|
| + |
| namespace cricket { |
| // PortAllocator is responsible for allocating Port types for a given |
| @@ -165,6 +170,11 @@ class PortAllocatorSession : public sigslot::has_slots<> { |
| virtual void ClearGettingPorts() = 0; |
| // Whether the process of getting ports has been stopped. |
| virtual bool IsGettingPorts() = 0; |
| + // Re-gathers candidates on networks that do not have connections. Returns |
| + // true if any network does not have connections and regathering is started. |
| + virtual bool RegatherOnFailedNetworks() {} |
|
Taylor Brandstetter
2016/06/21 23:36:12
Default implementation should return false.
|
| + // Re-gathers candidates on all networks. |
| + virtual void RegatherOnAllNetworks() {} |
| // Another way of getting the information provided by the signals below. |
| // |
| @@ -172,6 +182,8 @@ class PortAllocatorSession : public sigslot::has_slots<> { |
| // signals were emitted in. |
| virtual std::vector<PortInterface*> ReadyPorts() const = 0; |
| virtual std::vector<Candidate> ReadyCandidates() const = 0; |
| + // Returns the sanitized candidates on |port|. |
| + virtual std::vector<Candidate> ReadyCandidates(PortInterface* port) const = 0; |
| virtual bool CandidatesAllocationDone() const = 0; |
| sigslot::signal2<PortAllocatorSession*, PortInterface*> SignalPortReady; |
| @@ -263,6 +275,8 @@ class PortAllocator : public sigslot::has_slots<> { |
| // loopback interfaces. |
| virtual void SetNetworkIgnoreMask(int network_ignore_mask) = 0; |
| + virtual rtc::NetworkManager* network_manager() const = 0; |
|
Taylor Brandstetter
2016/06/21 23:36:12
I didn't notice this before, but the PortAllocator
|
| + |
| std::unique_ptr<PortAllocatorSession> CreateSession( |
| const std::string& sid, |
| const std::string& content_name, |