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 15 matching lines...) Expand all Loading... |
26 #include "remoting/host/constants.h" | 26 #include "remoting/host/constants.h" |
27 #include "remoting/host/capturer.h" | 27 #include "remoting/host/capturer.h" |
28 #include "remoting/host/chromoting_host.h" | 28 #include "remoting/host/chromoting_host.h" |
29 #include "remoting/host/chromoting_host_context.h" | 29 #include "remoting/host/chromoting_host_context.h" |
30 #include "remoting/host/desktop_environment.h" | 30 #include "remoting/host/desktop_environment.h" |
31 #include "remoting/host/event_executor.h" | 31 #include "remoting/host/event_executor.h" |
32 #include "remoting/host/heartbeat_sender.h" | 32 #include "remoting/host/heartbeat_sender.h" |
33 #include "remoting/host/host_config.h" | 33 #include "remoting/host/host_config.h" |
34 #include "remoting/host/host_event_logger.h" | 34 #include "remoting/host/host_event_logger.h" |
35 #include "remoting/host/host_user_interface.h" | 35 #include "remoting/host/host_user_interface.h" |
| 36 #include "remoting/host/jingle_session_manager_factory.h" |
36 #include "remoting/host/json_host_config.h" | 37 #include "remoting/host/json_host_config.h" |
37 #include "remoting/host/log_to_server.h" | 38 #include "remoting/host/log_to_server.h" |
38 #include "remoting/host/policy_hack/nat_policy.h" | 39 #include "remoting/host/policy_hack/nat_policy.h" |
39 #include "remoting/host/signaling_connector.h" | 40 #include "remoting/host/signaling_connector.h" |
40 #include "remoting/jingle_glue/xmpp_signal_strategy.h" | 41 #include "remoting/jingle_glue/xmpp_signal_strategy.h" |
41 #include "remoting/protocol/me2me_host_authenticator_factory.h" | 42 #include "remoting/protocol/me2me_host_authenticator_factory.h" |
42 | 43 |
43 #if defined(OS_MACOSX) | 44 #if defined(OS_MACOSX) |
44 #include "base/mac/scoped_nsautorelease_pool.h" | 45 #include "base/mac/scoped_nsautorelease_pool.h" |
45 #include "remoting/host/sighup_listener_mac.h" | 46 #include "remoting/host/sighup_listener_mac.h" |
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 allow_nat_traversal_ ? | 376 allow_nat_traversal_ ? |
376 NetworkSettings::NAT_TRAVERSAL_ENABLED : | 377 NetworkSettings::NAT_TRAVERSAL_ENABLED : |
377 NetworkSettings::NAT_TRAVERSAL_DISABLED); | 378 NetworkSettings::NAT_TRAVERSAL_DISABLED); |
378 if (!allow_nat_traversal_) { | 379 if (!allow_nat_traversal_) { |
379 network_settings.min_port = kMinPortNumber; | 380 network_settings.min_port = kMinPortNumber; |
380 network_settings.max_port = kMaxPortNumber; | 381 network_settings.max_port = kMaxPortNumber; |
381 } | 382 } |
382 | 383 |
383 host_ = new ChromotingHost( | 384 host_ = new ChromotingHost( |
384 context_.get(), signal_strategy_.get(), desktop_environment_.get(), | 385 context_.get(), signal_strategy_.get(), desktop_environment_.get(), |
| 386 scoped_ptr<SessionManagerFactory>(new JingleSessionManagerFactory()), |
385 network_settings); | 387 network_settings); |
386 | 388 |
387 heartbeat_sender_.reset(new HeartbeatSender( | 389 heartbeat_sender_.reset(new HeartbeatSender( |
388 this, host_id_, signal_strategy_.get(), &key_pair_)); | 390 this, host_id_, signal_strategy_.get(), &key_pair_)); |
389 | 391 |
390 log_to_server_.reset( | 392 log_to_server_.reset( |
391 new LogToServer(host_, ServerLogEntry::ME2ME, signal_strategy_.get())); | 393 new LogToServer(host_, ServerLogEntry::ME2ME, signal_strategy_.get())); |
392 host_event_logger_ = HostEventLogger::Create(host_, kApplicationName); | 394 host_event_logger_ = HostEventLogger::Create(host_, kApplicationName); |
393 | 395 |
394 #if defined(OS_MACOSX) || defined(OS_WIN) | 396 #if defined(OS_MACOSX) || defined(OS_WIN) |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
567 | 569 |
568 // Mark the process as DPI-aware, so Windows won't scale coordinates in APIs. | 570 // Mark the process as DPI-aware, so Windows won't scale coordinates in APIs. |
569 SetProcessDPIAware(); | 571 SetProcessDPIAware(); |
570 | 572 |
571 // CommandLine::Init() ignores the passed |argc| and |argv| on Windows getting | 573 // CommandLine::Init() ignores the passed |argc| and |argv| on Windows getting |
572 // the command line from GetCommandLineW(), so we can safely pass NULL here. | 574 // the command line from GetCommandLineW(), so we can safely pass NULL here. |
573 return main(0, NULL); | 575 return main(0, NULL); |
574 } | 576 } |
575 | 577 |
576 #endif // defined(OS_WIN) | 578 #endif // defined(OS_WIN) |
OLD | NEW |