| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 1435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1446 protocol::CandidateSessionConfig::CreateDefault(); | 1446 protocol::CandidateSessionConfig::CreateDefault(); |
| 1447 if (!desktop_environment_factory_->SupportsAudioCapture()) | 1447 if (!desktop_environment_factory_->SupportsAudioCapture()) |
| 1448 protocol_config->DisableAudioChannel(); | 1448 protocol_config->DisableAudioChannel(); |
| 1449 if (enable_vp9_) | 1449 if (enable_vp9_) |
| 1450 protocol_config->set_vp9_experiment_enabled(true); | 1450 protocol_config->set_vp9_experiment_enabled(true); |
| 1451 protocol_config->set_webrtc_supported(true); | 1451 protocol_config->set_webrtc_supported(true); |
| 1452 session_manager->set_protocol_config(std::move(protocol_config)); | 1452 session_manager->set_protocol_config(std::move(protocol_config)); |
| 1453 | 1453 |
| 1454 host_.reset(new ChromotingHost(desktop_environment_factory_.get(), | 1454 host_.reset(new ChromotingHost(desktop_environment_factory_.get(), |
| 1455 std::move(session_manager), transport_context, | 1455 std::move(session_manager), transport_context, |
| 1456 context_->audio_task_runner(), | 1456 *context_)); |
| 1457 context_->video_encode_task_runner())); | |
| 1458 | 1457 |
| 1459 if (gnubby_auth_policy_enabled_ && gnubby_extension_supported_) { | 1458 if (gnubby_auth_policy_enabled_ && gnubby_extension_supported_) { |
| 1460 host_->AddExtension(base::WrapUnique(new GnubbyExtension())); | 1459 host_->AddExtension(base::WrapUnique(new GnubbyExtension())); |
| 1461 } | 1460 } |
| 1462 | 1461 |
| 1463 // TODO(simonmorris): Get the maximum session duration from a policy. | 1462 // TODO(simonmorris): Get the maximum session duration from a policy. |
| 1464 #if defined(OS_LINUX) | 1463 #if defined(OS_LINUX) |
| 1465 host_->SetMaximumSessionDuration(base::TimeDelta::FromHours(20)); | 1464 host_->SetMaximumSessionDuration(base::TimeDelta::FromHours(20)); |
| 1466 #endif | 1465 #endif |
| 1467 | 1466 |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1655 base::TimeDelta::FromSeconds(kShutdownTimeoutSeconds)); | 1654 base::TimeDelta::FromSeconds(kShutdownTimeoutSeconds)); |
| 1656 new HostProcess(std::move(context), &exit_code, &shutdown_watchdog); | 1655 new HostProcess(std::move(context), &exit_code, &shutdown_watchdog); |
| 1657 | 1656 |
| 1658 // Run the main (also UI) message loop until the host no longer needs it. | 1657 // Run the main (also UI) message loop until the host no longer needs it. |
| 1659 message_loop.Run(); | 1658 message_loop.Run(); |
| 1660 | 1659 |
| 1661 return exit_code; | 1660 return exit_code; |
| 1662 } | 1661 } |
| 1663 | 1662 |
| 1664 } // namespace remoting | 1663 } // namespace remoting |
| OLD | NEW |