| 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. | 5 // This file implements a standalone host process for Me2Me. |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/at_exit.h" | 9 #include "base/at_exit.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 707 if (!allow_nat_traversal_) { | 707 if (!allow_nat_traversal_) { |
| 708 network_settings.min_port = NetworkSettings::kDefaultMinPort; | 708 network_settings.min_port = NetworkSettings::kDefaultMinPort; |
| 709 network_settings.max_port = NetworkSettings::kDefaultMaxPort; | 709 network_settings.max_port = NetworkSettings::kDefaultMaxPort; |
| 710 } | 710 } |
| 711 | 711 |
| 712 host_ = new ChromotingHost( | 712 host_ = new ChromotingHost( |
| 713 signal_strategy_.get(), | 713 signal_strategy_.get(), |
| 714 desktop_environment_factory_.get(), | 714 desktop_environment_factory_.get(), |
| 715 CreateHostSessionManager(network_settings, | 715 CreateHostSessionManager(network_settings, |
| 716 context_->url_request_context_getter()), | 716 context_->url_request_context_getter()), |
| 717 context_->audio_task_runner(), |
| 717 context_->capture_task_runner(), | 718 context_->capture_task_runner(), |
| 718 context_->encode_task_runner(), | 719 context_->encode_task_runner(), |
| 719 context_->network_task_runner()); | 720 context_->network_task_runner()); |
| 720 | 721 |
| 721 // TODO(simonmorris): Get the maximum session duration from a policy. | 722 // TODO(simonmorris): Get the maximum session duration from a policy. |
| 722 #if defined(OS_LINUX) | 723 #if defined(OS_LINUX) |
| 723 host_->SetMaximumSessionDuration(base::TimeDelta::FromHours(20)); | 724 host_->SetMaximumSessionDuration(base::TimeDelta::FromHours(20)); |
| 724 #endif | 725 #endif |
| 725 | 726 |
| 726 heartbeat_sender_.reset(new HeartbeatSender( | 727 heartbeat_sender_.reset(new HeartbeatSender( |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 944 user32.GetFunctionPointer("SetProcessDPIAware")); | 945 user32.GetFunctionPointer("SetProcessDPIAware")); |
| 945 set_process_dpi_aware(); | 946 set_process_dpi_aware(); |
| 946 } | 947 } |
| 947 | 948 |
| 948 // CommandLine::Init() ignores the passed |argc| and |argv| on Windows getting | 949 // CommandLine::Init() ignores the passed |argc| and |argv| on Windows getting |
| 949 // the command line from GetCommandLineW(), so we can safely pass NULL here. | 950 // the command line from GetCommandLineW(), so we can safely pass NULL here. |
| 950 return main(0, NULL); | 951 return main(0, NULL); |
| 951 } | 952 } |
| 952 | 953 |
| 953 #endif // defined(OS_WIN) | 954 #endif // defined(OS_WIN) |
| OLD | NEW |