| 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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 DCHECK(!host_); | 231 DCHECK(!host_); |
| 232 | 232 |
| 233 if (!signal_strategy_.get()) { | 233 if (!signal_strategy_.get()) { |
| 234 signal_strategy_.reset( | 234 signal_strategy_.reset( |
| 235 new XmppSignalStrategy(context_->jingle_thread(), xmpp_login_, | 235 new XmppSignalStrategy(context_->jingle_thread(), xmpp_login_, |
| 236 xmpp_auth_token_, xmpp_auth_service_)); | 236 xmpp_auth_token_, xmpp_auth_service_)); |
| 237 signaling_connector_.reset( | 237 signaling_connector_.reset( |
| 238 new SignalingConnector(signal_strategy_.get())); | 238 new SignalingConnector(signal_strategy_.get())); |
| 239 } | 239 } |
| 240 | 240 |
| 241 if (!desktop_environment_.get()) | 241 if (!desktop_environment_.get()) { |
| 242 desktop_environment_ = DesktopEnvironment::Create(context_.get()); | 242 desktop_environment_ = |
| 243 DesktopEnvironment::CreateForService(context_.get()); |
| 244 } |
| 243 | 245 |
| 244 protocol::NetworkSettings network_settings(allow_nat_traversal_); | 246 protocol::NetworkSettings network_settings(allow_nat_traversal_); |
| 245 if (!allow_nat_traversal_) { | 247 if (!allow_nat_traversal_) { |
| 246 network_settings.min_port = kMinPortNumber; | 248 network_settings.min_port = kMinPortNumber; |
| 247 network_settings.max_port = kMaxPortNumber; | 249 network_settings.max_port = kMaxPortNumber; |
| 248 } | 250 } |
| 249 | 251 |
| 250 host_ = new ChromotingHost( | 252 host_ = new ChromotingHost( |
| 251 context_.get(), signal_strategy_.get(), desktop_environment_.get(), | 253 context_.get(), signal_strategy_.get(), desktop_environment_.get(), |
| 252 network_settings); | 254 network_settings); |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 int CALLBACK WinMain(HINSTANCE instance, | 352 int CALLBACK WinMain(HINSTANCE instance, |
| 351 HINSTANCE previous_instance, | 353 HINSTANCE previous_instance, |
| 352 LPSTR command_line, | 354 LPSTR command_line, |
| 353 int show_command) { | 355 int show_command) { |
| 354 // CommandLine::Init() ignores the passed |argc| and |argv| on Windows getting | 356 // CommandLine::Init() ignores the passed |argc| and |argv| on Windows getting |
| 355 // the command line from GetCommandLineW(), so we can safely pass NULL here. | 357 // the command line from GetCommandLineW(), so we can safely pass NULL here. |
| 356 return main(0, NULL); | 358 return main(0, NULL); |
| 357 } | 359 } |
| 358 | 360 |
| 359 #endif | 361 #endif |
| OLD | NEW |