Chromium Code Reviews| 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 "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "net/base/net_util.h" | 10 #include "net/base/net_util.h" |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 27 // HttpPortAllocator. Refactor HttpPortAllocator | 27 // HttpPortAllocator. Refactor HttpPortAllocator |
| 28 class P2PPortAllocator : public cricket::BasicPortAllocator { | 28 class P2PPortAllocator : public cricket::BasicPortAllocator { |
| 29 public: | 29 public: |
| 30 P2PPortAllocator(WebKit::WebFrame* web_frame, | 30 P2PPortAllocator(WebKit::WebFrame* web_frame, |
| 31 P2PSocketDispatcher* socket_dispatcher, | 31 P2PSocketDispatcher* socket_dispatcher, |
| 32 talk_base::NetworkManager* network_manager, | 32 talk_base::NetworkManager* network_manager, |
| 33 talk_base::PacketSocketFactory* socket_factory, | 33 talk_base::PacketSocketFactory* socket_factory, |
| 34 const webkit_glue::P2PTransport::Config& config); | 34 const webkit_glue::P2PTransport::Config& config); |
| 35 virtual ~P2PPortAllocator(); | 35 virtual ~P2PPortAllocator(); |
| 36 | 36 |
| 37 virtual cricket::PortAllocatorSession* CreateSession( | 37 virtual cricket::PortAllocatorSession* CreateSessionInternal( |
| 38 const std::string& channel_name, | 38 const std::string& channel_name, |
| 39 int component) OVERRIDE; | 39 int component, |
| 40 const std::string& ice_ufrag, | |
|
Sergey Ulanov
2012/05/09 18:58:00
ise_username_fragment or just ice_username?
Mallinath (Gone from Chromium)
2012/05/09 22:04:22
Done.
| |
| 41 const std::string& ice_pwd) OVERRIDE; | |
|
Sergey Ulanov
2012/05/09 18:58:00
ice_password?
Mallinath (Gone from Chromium)
2012/05/09 22:04:22
Done.
| |
| 40 | 42 |
| 41 private: | 43 private: |
| 42 friend class P2PPortAllocatorSession; | 44 friend class P2PPortAllocatorSession; |
| 43 | 45 |
| 44 WebKit::WebFrame* web_frame_; | 46 WebKit::WebFrame* web_frame_; |
| 45 P2PSocketDispatcher* socket_dispatcher_; | 47 P2PSocketDispatcher* socket_dispatcher_; |
| 46 webkit_glue::P2PTransport::Config config_; | 48 webkit_glue::P2PTransport::Config config_; |
| 47 | 49 |
| 48 DISALLOW_COPY_AND_ASSIGN(P2PPortAllocator); | 50 DISALLOW_COPY_AND_ASSIGN(P2PPortAllocator); |
| 49 }; | 51 }; |
| 50 | 52 |
| 51 class P2PPortAllocatorSession : public cricket::BasicPortAllocatorSession, | 53 class P2PPortAllocatorSession : public cricket::BasicPortAllocatorSession, |
| 52 public WebKit::WebURLLoaderClient { | 54 public WebKit::WebURLLoaderClient { |
| 53 public: | 55 public: |
| 54 P2PPortAllocatorSession( | 56 P2PPortAllocatorSession( |
| 55 P2PPortAllocator* allocator, | 57 P2PPortAllocator* allocator, |
| 56 const std::string& channel_name, | 58 const std::string& channel_name, |
| 57 int candidate); | 59 int component, |
| 60 const std::string& ice_ufrag, | |
|
Sergey Ulanov
2012/05/09 18:58:00
same here
Mallinath (Gone from Chromium)
2012/05/09 22:04:22
Done.
Mallinath (Gone from Chromium)
2012/05/09 22:04:22
Done.
| |
| 61 const std::string& ice_pwd); | |
| 58 virtual ~P2PPortAllocatorSession(); | 62 virtual ~P2PPortAllocatorSession(); |
| 59 | 63 |
| 60 // WebKit::WebURLLoaderClient overrides. | 64 // WebKit::WebURLLoaderClient overrides. |
| 61 virtual void didReceiveData(WebKit::WebURLLoader* loader, | 65 virtual void didReceiveData(WebKit::WebURLLoader* loader, |
| 62 const char* data, | 66 const char* data, |
| 63 int data_length, | 67 int data_length, |
| 64 int encoded_data_length) OVERRIDE; | 68 int encoded_data_length) OVERRIDE; |
| 65 virtual void didFinishLoading(WebKit::WebURLLoader* loader, | 69 virtual void didFinishLoading(WebKit::WebURLLoader* loader, |
| 66 double finish_time) OVERRIDE; | 70 double finish_time) OVERRIDE; |
| 67 virtual void didFail(WebKit::WebURLLoader* loader, | 71 virtual void didFail(WebKit::WebURLLoader* loader, |
| (...skipping 24 matching lines...) Expand all Loading... | |
| 92 int relay_udp_port_; | 96 int relay_udp_port_; |
| 93 int relay_tcp_port_; | 97 int relay_tcp_port_; |
| 94 int relay_ssltcp_port_; | 98 int relay_ssltcp_port_; |
| 95 | 99 |
| 96 DISALLOW_COPY_AND_ASSIGN(P2PPortAllocatorSession); | 100 DISALLOW_COPY_AND_ASSIGN(P2PPortAllocatorSession); |
| 97 }; | 101 }; |
| 98 | 102 |
| 99 } // namespace content | 103 } // namespace content |
| 100 | 104 |
| 101 #endif // CONTENT_RENDERER_P2P_PORT_ALLOCATOR_H_ | 105 #endif // CONTENT_RENDERER_P2P_PORT_ALLOCATOR_H_ |
| OLD | NEW |