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

Unified Diff: content/renderer/p2p/port_allocator.h

Issue 10854131: Remove obsolete webkit_glue::P2PTransport interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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
« no previous file with comments | « content/renderer/p2p/p2p_transport_impl_unittest.cc ('k') | content/renderer/p2p/port_allocator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/p2p/port_allocator.h
diff --git a/content/renderer/p2p/port_allocator.h b/content/renderer/p2p/port_allocator.h
index 547efd547def8965e0746733a049d0be313d8fd4..05716c95556687f7f3c5de309101930db7d2313f 100644
--- a/content/renderer/p2p/port_allocator.h
+++ b/content/renderer/p2p/port_allocator.h
@@ -10,7 +10,6 @@
#include "net/base/net_util.h"
#include "third_party/libjingle/source/talk/p2p/client/basicportallocator.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLLoaderClient.h"
-#include "webkit/glue/p2p_transport.h"
namespace WebKit {
class WebFrame;
@@ -23,15 +22,42 @@ class P2PHostAddressRequest;
class P2PPortAllocatorSession;
class P2PSocketDispatcher;
-// TODO(sergeyu): There is overlap between this class and
-// HttpPortAllocator. Refactor HttpPortAllocator
+// TODO(sergeyu): There is overlap between this class and HttpPortAllocator.
+// Refactor this class to inherit from HttpPortAllocator to avoid code
+// duplication.
class P2PPortAllocator : public cricket::BasicPortAllocator {
public:
+ struct Config {
+ Config();
+ ~Config();
+
+ // STUN server address and port.
+ std::string stun_server;
+ int stun_server_port;
+
+ // Relay server address and port.
+ std::string relay_server;
+ int relay_server_port;
+
+ // Relay server username.
+ std::string relay_username;
+
+ // Relay server password.
+ std::string relay_password;
+
+ // When set to true relay is a legacy Google relay (not TURN
brettw 2012/08/15 19:18:49 I think this comment may fit on one line.
Sergey Ulanov 2012/08/15 19:25:03 Done.
+ // compliant).
+ bool legacy_relay;
+
+ // Disable TCP-based transport when set to true.
+ bool disable_tcp_transport;
+ };
+
P2PPortAllocator(WebKit::WebFrame* web_frame,
P2PSocketDispatcher* socket_dispatcher,
talk_base::NetworkManager* network_manager,
talk_base::PacketSocketFactory* socket_factory,
- const webkit_glue::P2PTransport::Config& config);
+ const Config& config);
virtual ~P2PPortAllocator();
virtual cricket::PortAllocatorSession* CreateSessionInternal(
@@ -45,7 +71,7 @@ class P2PPortAllocator : public cricket::BasicPortAllocator {
WebKit::WebFrame* web_frame_;
P2PSocketDispatcher* socket_dispatcher_;
- webkit_glue::P2PTransport::Config config_;
+ Config config_;
DISALLOW_COPY_AND_ASSIGN(P2PPortAllocator);
};
« no previous file with comments | « content/renderer/p2p/p2p_transport_impl_unittest.cc ('k') | content/renderer/p2p/port_allocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698