| 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 is an application of a minimal host process in a Chromoting | 5 // This is an application of a minimal host process in a Chromoting |
| 6 // system. It serves the purpose of gluing different pieces together | 6 // system. It serves the purpose of gluing different pieces together |
| 7 // to make a functional host process for testing. | 7 // to make a functional host process for testing. |
| 8 // | 8 // |
| 9 // It peforms the following functionality: | 9 // It peforms the following functionality: |
| 10 // 1. Connect to the GTalk network and register the machine as a host. | 10 // 1. Connect to the GTalk network and register the machine as a host. |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 #include "remoting/host/capturer_fake.h" | 35 #include "remoting/host/capturer_fake.h" |
| 36 #include "remoting/host/chromoting_host.h" | 36 #include "remoting/host/chromoting_host.h" |
| 37 #include "remoting/host/chromoting_host_context.h" | 37 #include "remoting/host/chromoting_host_context.h" |
| 38 #include "remoting/host/constants.h" | 38 #include "remoting/host/constants.h" |
| 39 #include "remoting/host/desktop_environment.h" | 39 #include "remoting/host/desktop_environment.h" |
| 40 #include "remoting/host/event_executor.h" | 40 #include "remoting/host/event_executor.h" |
| 41 #include "remoting/host/heartbeat_sender.h" | 41 #include "remoting/host/heartbeat_sender.h" |
| 42 #include "remoting/host/host_key_pair.h" | 42 #include "remoting/host/host_key_pair.h" |
| 43 #include "remoting/host/host_secret.h" | 43 #include "remoting/host/host_secret.h" |
| 44 #include "remoting/host/it2me_host_user_interface.h" | 44 #include "remoting/host/it2me_host_user_interface.h" |
| 45 #include "remoting/host/jingle_session_manager_factory.h" |
| 45 #include "remoting/host/json_host_config.h" | 46 #include "remoting/host/json_host_config.h" |
| 46 #include "remoting/host/log_to_server.h" | 47 #include "remoting/host/log_to_server.h" |
| 47 #include "remoting/host/register_support_host_request.h" | 48 #include "remoting/host/register_support_host_request.h" |
| 48 #include "remoting/host/signaling_connector.h" | 49 #include "remoting/host/signaling_connector.h" |
| 49 #include "remoting/jingle_glue/xmpp_signal_strategy.h" | 50 #include "remoting/jingle_glue/xmpp_signal_strategy.h" |
| 50 #include "remoting/proto/video.pb.h" | 51 #include "remoting/proto/video.pb.h" |
| 51 #include "remoting/protocol/it2me_host_authenticator_factory.h" | 52 #include "remoting/protocol/it2me_host_authenticator_factory.h" |
| 52 #include "remoting/protocol/me2me_host_authenticator_factory.h" | 53 #include "remoting/protocol/me2me_host_authenticator_factory.h" |
| 53 | 54 |
| 54 #if defined(TOOLKIT_GTK) | 55 #if defined(TOOLKIT_GTK) |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 EventExecutor::Create(context_.desktop_message_loop(), | 227 EventExecutor::Create(context_.desktop_message_loop(), |
| 227 context_.ui_message_loop(), | 228 context_.ui_message_loop(), |
| 228 capturer.get()); | 229 capturer.get()); |
| 229 desktop_environment_ = DesktopEnvironment::CreateFake( | 230 desktop_environment_ = DesktopEnvironment::CreateFake( |
| 230 &context_, capturer.Pass(), event_executor.Pass()); | 231 &context_, capturer.Pass(), event_executor.Pass()); |
| 231 } else { | 232 } else { |
| 232 desktop_environment_ = DesktopEnvironment::Create(&context_); | 233 desktop_environment_ = DesktopEnvironment::Create(&context_); |
| 233 } | 234 } |
| 234 | 235 |
| 235 host_ = new ChromotingHost(&context_, signal_strategy_.get(), | 236 host_ = new ChromotingHost(&context_, signal_strategy_.get(), |
| 236 desktop_environment_.get(), network_settings_); | 237 desktop_environment_.get(), |
| 238 scoped_ptr<SessionManagerFactory>( |
| 239 new JingleSessionManagerFactory()), |
| 240 network_settings_); |
| 237 | 241 |
| 238 ServerLogEntry::Mode mode = | 242 ServerLogEntry::Mode mode = |
| 239 is_it2me_ ? ServerLogEntry::IT2ME : ServerLogEntry::ME2ME; | 243 is_it2me_ ? ServerLogEntry::IT2ME : ServerLogEntry::ME2ME; |
| 240 log_to_server_.reset(new LogToServer(host_, mode, signal_strategy_.get())); | 244 log_to_server_.reset(new LogToServer(host_, mode, signal_strategy_.get())); |
| 241 | 245 |
| 242 if (is_it2me_) { | 246 if (is_it2me_) { |
| 243 it2me_host_user_interface_.reset(new It2MeHostUserInterface(&context_)); | 247 it2me_host_user_interface_.reset(new It2MeHostUserInterface(&context_)); |
| 244 it2me_host_user_interface_->Start( | 248 it2me_host_user_interface_->Start( |
| 245 host_, | 249 host_, |
| 246 base::Bind(&ChromotingHost::Shutdown, host_, base::Closure())); | 250 base::Bind(&ChromotingHost::Shutdown, host_, base::Closure())); |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 407 max_port < 0 || max_port > 65535) { | 411 max_port < 0 || max_port > 65535) { |
| 408 LOG(ERROR) << "Invalid max-port value: " << max_port | 412 LOG(ERROR) << "Invalid max-port value: " << max_port |
| 409 << ". Expected integer in range [0, 65535]."; | 413 << ". Expected integer in range [0, 65535]."; |
| 410 return 1; | 414 return 1; |
| 411 } | 415 } |
| 412 simple_host.network_settings()->max_port = max_port; | 416 simple_host.network_settings()->max_port = max_port; |
| 413 } | 417 } |
| 414 | 418 |
| 415 return simple_host.Run(); | 419 return simple_host.Run(); |
| 416 } | 420 } |
| OLD | NEW |