Chromium Code Reviews| Index: webrtc/p2p/client/basicportallocator.h |
| diff --git a/webrtc/p2p/client/basicportallocator.h b/webrtc/p2p/client/basicportallocator.h |
| index 8ea66c431e76d560a6299c2831d77a1a83dfeb06..61a3360dcc9245761470e1e3a723edf73e348a15 100644 |
| --- a/webrtc/p2p/client/basicportallocator.h |
| +++ b/webrtc/p2p/client/basicportallocator.h |
| @@ -45,9 +45,13 @@ class BasicPortAllocator : public PortAllocator { |
| network_ignore_mask_ = network_ignore_mask; |
| } |
| + void GetNetworks(std::vector<rtc::Network*>* networks) const override { |
|
Taylor Brandstetter
2016/06/06 18:18:37
Instead of going through BasicPortAllocator, P2PTr
honghaiz3
2016/06/07 16:42:06
Done.
|
| + network_manager()->GetNetworks(networks); |
| + } |
| + |
| int network_ignore_mask() const { return network_ignore_mask_; } |
| - rtc::NetworkManager* network_manager() { return network_manager_; } |
| + rtc::NetworkManager* network_manager() const { return network_manager_; } |
| // If socket_factory() is set to NULL each PortAllocatorSession |
| // creates its own socket factory. |
| @@ -89,6 +93,7 @@ class BasicPortAllocatorSession : public PortAllocatorSession, |
| rtc::PacketSocketFactory* socket_factory() { return socket_factory_; } |
| void SetCandidateFilter(uint32_t filter) override; |
| + |
| void StartGettingPorts() override; |
| void StopGettingPorts() override; |
| void ClearGettingPorts() override; |
| @@ -97,6 +102,8 @@ class BasicPortAllocatorSession : public PortAllocatorSession, |
| std::vector<PortInterface*> ReadyPorts() const override; |
| std::vector<Candidate> ReadyCandidates() const override; |
| bool CandidatesAllocationDone() const override; |
| + void InactivateNetworksInExistingSequences( |
| + std::vector<rtc::Network*>* networks) override; |
| protected: |
| void UpdateIceParametersInternal() override; |
| @@ -255,11 +262,15 @@ class AllocationSequence : public rtc::MessageHandler, |
| ~AllocationSequence(); |
| bool Init(); |
| void Clear(); |
| - void OnNetworkRemoved(); |
| + void OnNetworkInactivated(); |
| State state() const { return state_; } |
| const rtc::Network* network() const { return network_; } |
| - bool network_removed() const { return network_removed_; } |
| + |
| + bool network_inactive() const { return network_inactive_; } |
| + void set_network_inactive(bool network_inactive) { |
| + network_inactive_ = network_inactive; |
| + } |
| // Disables the phases for a new sequence that this one already covers for an |
| // equivalent network setup. |
| @@ -309,7 +320,7 @@ class AllocationSequence : public rtc::MessageHandler, |
| void OnPortDestroyed(PortInterface* port); |
| BasicPortAllocatorSession* session_; |
| - bool network_removed_ = false; |
| + bool network_inactive_ = false; |
| rtc::Network* network_; |
| rtc::IPAddress ip_; |
| PortConfiguration* config_; |