| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_RENDERER_P2P_PORT_ALLOCATOR_H_ | 5 #ifndef CONTENT_RENDERER_P2P_PORT_ALLOCATOR_H_ |
| 6 #define CONTENT_RENDERER_P2P_PORT_ALLOCATOR_H_ | 6 #define CONTENT_RENDERER_P2P_PORT_ALLOCATOR_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 bool enable_default_local_candidate = true; | 38 bool enable_default_local_candidate = true; |
| 39 }; | 39 }; |
| 40 | 40 |
| 41 P2PPortAllocator(const scoped_refptr<P2PSocketDispatcher>& socket_dispatcher, | 41 P2PPortAllocator(const scoped_refptr<P2PSocketDispatcher>& socket_dispatcher, |
| 42 std::unique_ptr<rtc::NetworkManager> network_manager, | 42 std::unique_ptr<rtc::NetworkManager> network_manager, |
| 43 rtc::PacketSocketFactory* socket_factory, | 43 rtc::PacketSocketFactory* socket_factory, |
| 44 const Config& config, | 44 const Config& config, |
| 45 const GURL& origin); | 45 const GURL& origin); |
| 46 ~P2PPortAllocator() override; | 46 ~P2PPortAllocator() override; |
| 47 | 47 |
| 48 // Will also initialize the network manager passed into the constructor. |
| 49 void Initialize() override; |
| 50 |
| 48 private: | 51 private: |
| 49 std::unique_ptr<rtc::NetworkManager> network_manager_; | 52 std::unique_ptr<rtc::NetworkManager> network_manager_; |
| 50 scoped_refptr<P2PSocketDispatcher> socket_dispatcher_; | 53 scoped_refptr<P2PSocketDispatcher> socket_dispatcher_; |
| 51 Config config_; | 54 Config config_; |
| 52 GURL origin_; | 55 GURL origin_; |
| 53 | 56 |
| 54 DISALLOW_COPY_AND_ASSIGN(P2PPortAllocator); | 57 DISALLOW_COPY_AND_ASSIGN(P2PPortAllocator); |
| 55 }; | 58 }; |
| 56 | 59 |
| 57 } // namespace content | 60 } // namespace content |
| 58 | 61 |
| 59 #endif // CONTENT_RENDERER_P2P_PORT_ALLOCATOR_H_ | 62 #endif // CONTENT_RENDERER_P2P_PORT_ALLOCATOR_H_ |
| OLD | NEW |