Index: content/renderer/p2p/port_allocator.h |
diff --git a/content/renderer/p2p/port_allocator.h b/content/renderer/p2p/port_allocator.h |
index a789e7a93cc6384d14988deea084e0ca0c6f2f2d..fe817c2a91f304d842cfed941dbcab04890a1d68 100644 |
--- a/content/renderer/p2p/port_allocator.h |
+++ b/content/renderer/p2p/port_allocator.h |
@@ -5,6 +5,7 @@ |
#ifndef CONTENT_RENDERER_P2P_PORT_ALLOCATOR_H_ |
#define CONTENT_RENDERER_P2P_PORT_ALLOCATOR_H_ |
+#include "base/memory/ref_counted.h" |
#include "third_party/webrtc/p2p/client/basicportallocator.h" |
#include "url/gurl.h" |
@@ -44,11 +45,20 @@ class P2PPortAllocator : public cricket::BasicPortAllocator { |
bool enable_multiple_routes = true; |
}; |
- P2PPortAllocator(P2PSocketDispatcher* socket_dispatcher, |
- rtc::NetworkManager* network_manager, |
- rtc::PacketSocketFactory* socket_factory, |
- const Config& config, |
- const GURL& origin); |
+ struct Params { |
Sergey Ulanov
2015/09/21 22:12:59
Do you really need to add this? Does it need to be
guoweis_left_chromium
2015/09/22 17:56:56
Done.
|
+ Params(const scoped_refptr<P2PSocketDispatcher>& socket_dispatcher, |
+ rtc::PacketSocketFactory* socket_factory, |
+ const GURL& origin, |
+ const Config& config); |
+ ~Params(); |
+ const scoped_refptr<P2PSocketDispatcher> socket_dispatcher; |
+ rtc::PacketSocketFactory* socket_factory; |
+ GURL requesting_origin; |
+ Config config; |
+ }; |
+ |
+ P2PPortAllocator(const Params& params, |
+ scoped_ptr<rtc::NetworkManager> network_manager); |
~P2PPortAllocator() override; |
cricket::PortAllocatorSession* CreateSessionInternal( |
@@ -59,8 +69,8 @@ class P2PPortAllocator : public cricket::BasicPortAllocator { |
private: |
friend class P2PPortAllocatorSession; |
- |
- P2PSocketDispatcher* socket_dispatcher_; |
+ scoped_ptr<rtc::NetworkManager> network_manager_; |
+ scoped_refptr<P2PSocketDispatcher> socket_dispatcher_; |
Config config_; |
GURL origin_; |