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 // This file implements a standalone host process for Me2Me, which is currently | 5 // This file implements a standalone host process for Me2Me, which is currently |
6 // used for the Linux-only Virtual Me2Me build. | 6 // used for the Linux-only Virtual Me2Me build. |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/at_exit.h" | 10 #include "base/at_exit.h" |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 signal_strategy_.reset( | 201 signal_strategy_.reset( |
202 new XmppSignalStrategy(context_.jingle_thread(), xmpp_login_, | 202 new XmppSignalStrategy(context_.jingle_thread(), xmpp_login_, |
203 xmpp_auth_token_, xmpp_auth_service_)); | 203 xmpp_auth_token_, xmpp_auth_service_)); |
204 signaling_connector_.reset( | 204 signaling_connector_.reset( |
205 new SignalingConnector(signal_strategy_.get())); | 205 new SignalingConnector(signal_strategy_.get())); |
206 } | 206 } |
207 | 207 |
208 if (!desktop_environment_.get()) | 208 if (!desktop_environment_.get()) |
209 desktop_environment_.reset(DesktopEnvironment::Create(&context_)); | 209 desktop_environment_.reset(DesktopEnvironment::Create(&context_)); |
210 | 210 |
211 protocol::NetworkSettings network_settings; | 211 protocol::NetworkSettings network_settings(allow_nat_traversal_); |
212 network_settings.allow_nat_traversal = allow_nat_traversal_; | |
213 if (!allow_nat_traversal_) { | 212 if (!allow_nat_traversal_) { |
214 network_settings.min_port = kMinPortNumber; | 213 network_settings.min_port = kMinPortNumber; |
215 network_settings.max_port = kMaxPortNumber; | 214 network_settings.max_port = kMaxPortNumber; |
216 } | 215 } |
217 | 216 |
218 host_ = new ChromotingHost( | 217 host_ = new ChromotingHost( |
219 &context_, signal_strategy_.get(), desktop_environment_.get(), | 218 &context_, signal_strategy_.get(), desktop_environment_.get(), |
220 network_settings); | 219 network_settings); |
221 | 220 |
222 heartbeat_sender_.reset( | 221 heartbeat_sender_.reset( |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 // Continue windows, though these should not be used for the Me2Me case | 304 // Continue windows, though these should not be used for the Me2Me case |
306 // (crbug.com/104377). | 305 // (crbug.com/104377). |
307 gfx::GtkInitFromCommandLine(*cmd_line); | 306 gfx::GtkInitFromCommandLine(*cmd_line); |
308 #endif // TOOLKIT_USES_GTK | 307 #endif // TOOLKIT_USES_GTK |
309 | 308 |
310 remoting::HostProcess me2me_host; | 309 remoting::HostProcess me2me_host; |
311 me2me_host.InitWithCommandLine(cmd_line); | 310 me2me_host.InitWithCommandLine(cmd_line); |
312 | 311 |
313 return me2me_host.Run(); | 312 return me2me_host.Run(); |
314 } | 313 } |
OLD | NEW |