summaryrefslogtreecommitdiffstats
path: root/remoting/host/chromoting_host.h
diff options
context:
space:
mode:
authorsergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-01 00:40:50 +0000
committersergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-01 00:40:50 +0000
commit951785568c509f1a127b3d6a1cc48f3796b20b96 (patch)
treedfc5d31ea54b01a3eef4361d83eda1d02245de5f /remoting/host/chromoting_host.h
parent57a9cbcb121746271589eb014661ec5cc0d17303 (diff)
downloadchromium_src-951785568c509f1a127b3d6a1cc48f3796b20b96.zip
chromium_src-951785568c509f1a127b3d6a1cc48f3796b20b96.tar.gz
chromium_src-951785568c509f1a127b3d6a1cc48f3796b20b96.tar.bz2
Implement HostPortAllocator.
HostPortAllocator is a PortAllocator specific to Chromoting host. BUG=103991 Review URL: https://chromiumcodereview.appspot.com/10160013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@134650 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host/chromoting_host.h')
-rw-r--r--remoting/host/chromoting_host.h44
1 files changed, 1 insertions, 43 deletions
diff --git a/remoting/host/chromoting_host.h b/remoting/host/chromoting_host.h
index a9749ac..0c88bfb 100644
--- a/remoting/host/chromoting_host.h
+++ b/remoting/host/chromoting_host.h
@@ -18,6 +18,7 @@
#include "remoting/host/desktop_environment.h"
#include "remoting/host/host_key_pair.h"
#include "remoting/host/host_status_observer.h"
+#include "remoting/host/network_settings.h"
#include "remoting/host/ui_strings.h"
#include "remoting/jingle_glue/jingle_thread.h"
#include "remoting/jingle_glue/signal_strategy.h"
@@ -39,49 +40,6 @@ class DesktopEnvironment;
class Encoder;
class ScreenRecorder;
-struct NetworkSettings {
- enum NatTraversalMode {
- // Don't use STUN or relay servers. Accept incoming P2P connection
- // attempts, but don't initiate any. This ensures that the peer is
- // on the same network. Note that connection will always fail if
- // both ends use this mode.
- NAT_TRAVERSAL_DISABLED,
-
- // Don't use STUN or relay servers but make outgoing connections.
- NAT_TRAVERSAL_OUTGOING,
-
- // Active NAT traversal using STUN and relay servers.
- NAT_TRAVERSAL_ENABLED,
- };
-
- NetworkSettings()
- : nat_traversal_mode(NAT_TRAVERSAL_DISABLED),
- min_port(0),
- max_port(0) {
- }
-
- explicit NetworkSettings(bool allow_nat_traversal)
- : nat_traversal_mode(allow_nat_traversal ?
- NAT_TRAVERSAL_ENABLED :
- NAT_TRAVERSAL_DISABLED),
- min_port(0),
- max_port(0) {
- }
-
- explicit NetworkSettings(NatTraversalMode nat_traversal_mode)
- : nat_traversal_mode(nat_traversal_mode),
- min_port(0),
- max_port(0) {
- }
-
- NatTraversalMode nat_traversal_mode;
-
- // |min_port| and |max_port| specify range (inclusive) of ports used by
- // P2P sessions. Any port can be used when both values are set to 0.
- int min_port;
- int max_port;
-};
-
// A class to implement the functionality of a host process.
//
// Here's the work flow of this class: