| 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 #if defined(OS_WIN) | 8 #if defined(OS_WIN) |
| 9 #include <windows.h> | 9 #include <windows.h> |
| 10 #endif | 10 #endif |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 DCHECK(!host_); | 269 DCHECK(!host_); |
| 270 | 270 |
| 271 if (!signal_strategy_.get()) { | 271 if (!signal_strategy_.get()) { |
| 272 signal_strategy_.reset( | 272 signal_strategy_.reset( |
| 273 new XmppSignalStrategy(context_->jingle_thread(), xmpp_login_, | 273 new XmppSignalStrategy(context_->jingle_thread(), xmpp_login_, |
| 274 xmpp_auth_token_, xmpp_auth_service_)); | 274 xmpp_auth_token_, xmpp_auth_service_)); |
| 275 signaling_connector_.reset( | 275 signaling_connector_.reset( |
| 276 new SignalingConnector(signal_strategy_.get())); | 276 new SignalingConnector(signal_strategy_.get())); |
| 277 } | 277 } |
| 278 | 278 |
| 279 if (!desktop_environment_.get()) | 279 if (!desktop_environment_.get()) { |
| 280 desktop_environment_ = DesktopEnvironment::Create(context_.get()); | 280 desktop_environment_ = |
| 281 DesktopEnvironment::CreateForService(context_.get()); |
| 282 } |
| 281 | 283 |
| 282 protocol::NetworkSettings network_settings(allow_nat_traversal_); | 284 protocol::NetworkSettings network_settings(allow_nat_traversal_); |
| 283 if (!allow_nat_traversal_) { | 285 if (!allow_nat_traversal_) { |
| 284 network_settings.min_port = kMinPortNumber; | 286 network_settings.min_port = kMinPortNumber; |
| 285 network_settings.max_port = kMaxPortNumber; | 287 network_settings.max_port = kMaxPortNumber; |
| 286 } | 288 } |
| 287 | 289 |
| 288 host_ = new ChromotingHost( | 290 host_ = new ChromotingHost( |
| 289 context_.get(), signal_strategy_.get(), desktop_environment_.get(), | 291 context_.get(), signal_strategy_.get(), desktop_environment_.get(), |
| 290 network_settings); | 292 network_settings); |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 391 int CALLBACK WinMain(HINSTANCE instance, | 393 int CALLBACK WinMain(HINSTANCE instance, |
| 392 HINSTANCE previous_instance, | 394 HINSTANCE previous_instance, |
| 393 LPSTR command_line, | 395 LPSTR command_line, |
| 394 int show_command) { | 396 int show_command) { |
| 395 // CommandLine::Init() ignores the passed |argc| and |argv| on Windows getting | 397 // CommandLine::Init() ignores the passed |argc| and |argv| on Windows getting |
| 396 // the command line from GetCommandLineW(), so we can safely pass NULL here. | 398 // the command line from GetCommandLineW(), so we can safely pass NULL here. |
| 397 return main(0, NULL); | 399 return main(0, NULL); |
| 398 } | 400 } |
| 399 | 401 |
| 400 #endif | 402 #endif |
| OLD | NEW |