| 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 <string> | 10 #include <string> |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 #include "ipc/ipc_listener.h" | 31 #include "ipc/ipc_listener.h" |
| 32 #include "jingle/glue/thread_wrapper.h" | 32 #include "jingle/glue/thread_wrapper.h" |
| 33 #include "net/base/network_change_notifier.h" | 33 #include "net/base/network_change_notifier.h" |
| 34 #include "net/base/url_util.h" | 34 #include "net/base/url_util.h" |
| 35 #include "net/socket/client_socket_factory.h" | 35 #include "net/socket/client_socket_factory.h" |
| 36 #include "net/socket/ssl_server_socket.h" | 36 #include "net/socket/ssl_server_socket.h" |
| 37 #include "net/url_request/url_fetcher.h" | 37 #include "net/url_request/url_fetcher.h" |
| 38 #include "policy/policy_constants.h" | 38 #include "policy/policy_constants.h" |
| 39 #include "remoting/base/auto_thread_task_runner.h" | 39 #include "remoting/base/auto_thread_task_runner.h" |
| 40 #include "remoting/base/breakpad.h" | 40 #include "remoting/base/breakpad.h" |
| 41 #include "remoting/base/chromium_url_request.h" |
| 41 #include "remoting/base/constants.h" | 42 #include "remoting/base/constants.h" |
| 42 #include "remoting/base/logging.h" | 43 #include "remoting/base/logging.h" |
| 43 #include "remoting/base/rsa_key_pair.h" | 44 #include "remoting/base/rsa_key_pair.h" |
| 44 #include "remoting/base/service_urls.h" | 45 #include "remoting/base/service_urls.h" |
| 45 #include "remoting/base/util.h" | 46 #include "remoting/base/util.h" |
| 46 #include "remoting/host/branding.h" | 47 #include "remoting/host/branding.h" |
| 47 #include "remoting/host/chromoting_host.h" | 48 #include "remoting/host/chromoting_host.h" |
| 48 #include "remoting/host/chromoting_host_context.h" | 49 #include "remoting/host/chromoting_host_context.h" |
| 49 #include "remoting/host/chromoting_messages.h" | 50 #include "remoting/host/chromoting_messages.h" |
| 50 #include "remoting/host/config_file_watcher.h" | 51 #include "remoting/host/config_file_watcher.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 73 #include "remoting/host/signaling_connector.h" | 74 #include "remoting/host/signaling_connector.h" |
| 74 #include "remoting/host/single_window_desktop_environment.h" | 75 #include "remoting/host/single_window_desktop_environment.h" |
| 75 #include "remoting/host/switches.h" | 76 #include "remoting/host/switches.h" |
| 76 #include "remoting/host/third_party_auth_config.h" | 77 #include "remoting/host/third_party_auth_config.h" |
| 77 #include "remoting/host/token_validator_factory_impl.h" | 78 #include "remoting/host/token_validator_factory_impl.h" |
| 78 #include "remoting/host/usage_stats_consent.h" | 79 #include "remoting/host/usage_stats_consent.h" |
| 79 #include "remoting/host/username.h" | 80 #include "remoting/host/username.h" |
| 80 #include "remoting/host/video_frame_recorder_host_extension.h" | 81 #include "remoting/host/video_frame_recorder_host_extension.h" |
| 81 #include "remoting/protocol/authenticator.h" | 82 #include "remoting/protocol/authenticator.h" |
| 82 #include "remoting/protocol/channel_authenticator.h" | 83 #include "remoting/protocol/channel_authenticator.h" |
| 83 #include "remoting/protocol/chromium_port_allocator.h" | 84 #include "remoting/protocol/chromium_port_allocator_factory.h" |
| 84 #include "remoting/protocol/jingle_session_manager.h" | 85 #include "remoting/protocol/jingle_session_manager.h" |
| 85 #include "remoting/protocol/me2me_host_authenticator_factory.h" | 86 #include "remoting/protocol/me2me_host_authenticator_factory.h" |
| 86 #include "remoting/protocol/network_settings.h" | 87 #include "remoting/protocol/network_settings.h" |
| 87 #include "remoting/protocol/pairing_registry.h" | 88 #include "remoting/protocol/pairing_registry.h" |
| 88 #include "remoting/protocol/port_range.h" | 89 #include "remoting/protocol/port_range.h" |
| 89 #include "remoting/protocol/token_validator.h" | 90 #include "remoting/protocol/token_validator.h" |
| 90 #include "remoting/protocol/transport_context.h" | 91 #include "remoting/protocol/transport_context.h" |
| 91 #include "remoting/signaling/push_notification_subscriber.h" | 92 #include "remoting/signaling/push_notification_subscriber.h" |
| 92 #include "remoting/signaling/xmpp_signal_strategy.h" | 93 #include "remoting/signaling/xmpp_signal_strategy.h" |
| 93 #include "third_party/webrtc/base/scoped_ref_ptr.h" | 94 #include "third_party/webrtc/base/scoped_ref_ptr.h" |
| (...skipping 1421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1515 // For legacy reasons we have to restrict the port range to a set of default | 1516 // For legacy reasons we have to restrict the port range to a set of default |
| 1516 // values when nat traversal is disabled, even if the port range was not | 1517 // values when nat traversal is disabled, even if the port range was not |
| 1517 // set in policy. | 1518 // set in policy. |
| 1518 network_settings.port_range.min_port = NetworkSettings::kDefaultMinPort; | 1519 network_settings.port_range.min_port = NetworkSettings::kDefaultMinPort; |
| 1519 network_settings.port_range.max_port = NetworkSettings::kDefaultMaxPort; | 1520 network_settings.port_range.max_port = NetworkSettings::kDefaultMaxPort; |
| 1520 } | 1521 } |
| 1521 | 1522 |
| 1522 scoped_refptr<protocol::TransportContext> transport_context = | 1523 scoped_refptr<protocol::TransportContext> transport_context = |
| 1523 new protocol::TransportContext( | 1524 new protocol::TransportContext( |
| 1524 signal_strategy_.get(), | 1525 signal_strategy_.get(), |
| 1525 make_scoped_ptr(new protocol::ChromiumPortAllocatorFactory( | 1526 make_scoped_ptr(new protocol::ChromiumPortAllocatorFactory()), |
| 1527 make_scoped_ptr(new ChromiumUrlRequestFactory( |
| 1526 context_->url_request_context_getter())), | 1528 context_->url_request_context_getter())), |
| 1527 network_settings, protocol::TransportRole::SERVER); | 1529 network_settings, protocol::TransportRole::SERVER); |
| 1528 | 1530 |
| 1529 scoped_ptr<protocol::SessionManager> session_manager( | 1531 scoped_ptr<protocol::SessionManager> session_manager( |
| 1530 new protocol::JingleSessionManager(signal_strategy_.get())); | 1532 new protocol::JingleSessionManager(signal_strategy_.get())); |
| 1531 | 1533 |
| 1532 scoped_ptr<protocol::CandidateSessionConfig> protocol_config = | 1534 scoped_ptr<protocol::CandidateSessionConfig> protocol_config = |
| 1533 protocol::CandidateSessionConfig::CreateDefault(); | 1535 protocol::CandidateSessionConfig::CreateDefault(); |
| 1534 if (!desktop_environment_factory_->SupportsAudioCapture()) | 1536 if (!desktop_environment_factory_->SupportsAudioCapture()) |
| 1535 protocol_config->DisableAudioChannel(); | 1537 protocol_config->DisableAudioChannel(); |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1749 base::TimeDelta::FromSeconds(kShutdownTimeoutSeconds)); | 1751 base::TimeDelta::FromSeconds(kShutdownTimeoutSeconds)); |
| 1750 new HostProcess(std::move(context), &exit_code, &shutdown_watchdog); | 1752 new HostProcess(std::move(context), &exit_code, &shutdown_watchdog); |
| 1751 | 1753 |
| 1752 // Run the main (also UI) message loop until the host no longer needs it. | 1754 // Run the main (also UI) message loop until the host no longer needs it. |
| 1753 message_loop.Run(); | 1755 message_loop.Run(); |
| 1754 | 1756 |
| 1755 return exit_code; | 1757 return exit_code; |
| 1756 } | 1758 } |
| 1757 | 1759 |
| 1758 } // namespace remoting | 1760 } // namespace remoting |
| OLD | NEW |