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

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

Issue 2025573002: Use continual gathering to restore backup connections (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Address Taylor comments Created 4 years, 6 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/portallocator.h
diff --git a/webrtc/p2p/base/portallocator.h b/webrtc/p2p/base/portallocator.h
index 7d2a59f278ccb307ce0266ef89f65234eb291768..93c3352d18e73fe46fda90c483686d188f7b8df7 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
+
namespace cricket {
// PortAllocator is responsible for allocating Port types for a given
@@ -165,6 +170,9 @@ class PortAllocatorSession : public sigslot::has_slots<> {
virtual void ClearGettingPorts() = 0;
// Whether the process of getting ports has been stopped.
virtual bool IsGettingPorts() = 0;
+ // Get ports and re-gather candidates on the given networks.
+ // If |networks| is nullptr, get ports and candidates on all networks.
+ virtual void GetPortsOnNetworks(const std::vector<rtc::Network*>* networks) {}
pthatcher1 2016/06/07 18:54:34 I think this would be more clear with two methods:
// Another way of getting the information provided by the signals below.
//
@@ -172,6 +180,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 +273,8 @@ class PortAllocator : public sigslot::has_slots<> {
// loopback interfaces.
virtual void SetNetworkIgnoreMask(int network_ignore_mask) = 0;
+ virtual rtc::NetworkManager* network_manager() const = 0;
pthatcher1 2016/06/07 18:54:34 ***
+
std::unique_ptr<PortAllocatorSession> CreateSession(
const std::string& sid,
const std::string& content_name,

Powered by Google App Engine
This is Rietveld 408576698