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> | |
9 | 8 |
| 9 #include <cstdint> |
10 #include <memory> | 10 #include <memory> |
11 #include <string> | 11 #include <string> |
12 #include <utility> | 12 #include <utility> |
13 | 13 |
14 #include "base/bind.h" | 14 #include "base/bind.h" |
15 #include "base/callback.h" | 15 #include "base/callback.h" |
16 #include "base/command_line.h" | 16 #include "base/command_line.h" |
17 #include "base/debug/alias.h" | 17 #include "base/debug/alias.h" |
18 #include "base/files/file_path.h" | 18 #include "base/files/file_path.h" |
19 #include "base/files/file_util.h" | 19 #include "base/files/file_util.h" |
(...skipping 1434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1454 protocol_config->set_vp9_experiment_enabled(true); | 1454 protocol_config->set_vp9_experiment_enabled(true); |
1455 protocol_config->set_webrtc_supported(true); | 1455 protocol_config->set_webrtc_supported(true); |
1456 session_manager->set_protocol_config(std::move(protocol_config)); | 1456 session_manager->set_protocol_config(std::move(protocol_config)); |
1457 | 1457 |
1458 host_.reset(new ChromotingHost(desktop_environment_factory_.get(), | 1458 host_.reset(new ChromotingHost(desktop_environment_factory_.get(), |
1459 std::move(session_manager), transport_context, | 1459 std::move(session_manager), transport_context, |
1460 context_->audio_task_runner(), | 1460 context_->audio_task_runner(), |
1461 context_->video_encode_task_runner())); | 1461 context_->video_encode_task_runner())); |
1462 | 1462 |
1463 if (security_key_auth_policy_enabled_ && security_key_extension_supported_) { | 1463 if (security_key_auth_policy_enabled_ && security_key_extension_supported_) { |
1464 host_->AddExtension(base::WrapUnique(new SecurityKeyExtension())); | 1464 host_->AddExtension(base::WrapUnique( |
| 1465 new SecurityKeyExtension(context_->file_task_runner()))); |
1465 } | 1466 } |
1466 | 1467 |
1467 // TODO(simonmorris): Get the maximum session duration from a policy. | 1468 // TODO(simonmorris): Get the maximum session duration from a policy. |
1468 #if defined(OS_LINUX) | 1469 #if defined(OS_LINUX) |
1469 host_->SetMaximumSessionDuration(base::TimeDelta::FromHours(20)); | 1470 host_->SetMaximumSessionDuration(base::TimeDelta::FromHours(20)); |
1470 #endif | 1471 #endif |
1471 | 1472 |
1472 host_change_notification_listener_.reset(new HostChangeNotificationListener( | 1473 host_change_notification_listener_.reset(new HostChangeNotificationListener( |
1473 this, host_id_, signal_strategy_.get(), directory_bot_jid_)); | 1474 this, host_id_, signal_strategy_.get(), directory_bot_jid_)); |
1474 | 1475 |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1665 base::TimeDelta::FromSeconds(kShutdownTimeoutSeconds)); | 1666 base::TimeDelta::FromSeconds(kShutdownTimeoutSeconds)); |
1666 new HostProcess(std::move(context), &exit_code, &shutdown_watchdog); | 1667 new HostProcess(std::move(context), &exit_code, &shutdown_watchdog); |
1667 | 1668 |
1668 // Run the main (also UI) message loop until the host no longer needs it. | 1669 // Run the main (also UI) message loop until the host no longer needs it. |
1669 message_loop.Run(); | 1670 message_loop.Run(); |
1670 | 1671 |
1671 return exit_code; | 1672 return exit_code; |
1672 } | 1673 } |
1673 | 1674 |
1674 } // namespace remoting | 1675 } // namespace remoting |
OLD | NEW |