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 22 matching lines...) Expand all Loading... |
33 #include "remoting/base/breakpad.h" | 33 #include "remoting/base/breakpad.h" |
34 #include "remoting/base/constants.h" | 34 #include "remoting/base/constants.h" |
35 #include "remoting/host/branding.h" | 35 #include "remoting/host/branding.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/chromoting_messages.h" | 38 #include "remoting/host/chromoting_messages.h" |
39 #include "remoting/host/config_file_watcher.h" | 39 #include "remoting/host/config_file_watcher.h" |
40 #include "remoting/host/constants.h" | 40 #include "remoting/host/constants.h" |
41 #include "remoting/host/config_file_watcher.h" | 41 #include "remoting/host/config_file_watcher.h" |
42 #include "remoting/host/desktop_environment_factory.h" | 42 #include "remoting/host/desktop_environment_factory.h" |
| 43 #include "remoting/host/desktop_resizer.h" |
43 #include "remoting/host/dns_blackhole_checker.h" | 44 #include "remoting/host/dns_blackhole_checker.h" |
44 #include "remoting/host/event_executor.h" | 45 #include "remoting/host/event_executor.h" |
45 #include "remoting/host/heartbeat_sender.h" | 46 #include "remoting/host/heartbeat_sender.h" |
46 #include "remoting/host/host_config.h" | 47 #include "remoting/host/host_config.h" |
47 #include "remoting/host/host_event_logger.h" | 48 #include "remoting/host/host_event_logger.h" |
48 #include "remoting/host/host_user_interface.h" | 49 #include "remoting/host/host_user_interface.h" |
49 #include "remoting/host/json_host_config.h" | 50 #include "remoting/host/json_host_config.h" |
50 #include "remoting/host/log_to_server.h" | 51 #include "remoting/host/log_to_server.h" |
51 #include "remoting/host/network_settings.h" | 52 #include "remoting/host/network_settings.h" |
52 #include "remoting/host/policy_hack/policy_watcher.h" | 53 #include "remoting/host/policy_hack/policy_watcher.h" |
| 54 #include "remoting/host/resizing_host_observer.h" |
53 #include "remoting/host/session_manager_factory.h" | 55 #include "remoting/host/session_manager_factory.h" |
54 #include "remoting/host/signaling_connector.h" | 56 #include "remoting/host/signaling_connector.h" |
55 #include "remoting/host/usage_stats_consent.h" | 57 #include "remoting/host/usage_stats_consent.h" |
56 #include "remoting/host/video_frame_capturer.h" | 58 #include "remoting/host/video_frame_capturer.h" |
57 #include "remoting/jingle_glue/xmpp_signal_strategy.h" | 59 #include "remoting/jingle_glue/xmpp_signal_strategy.h" |
58 #include "remoting/protocol/me2me_host_authenticator_factory.h" | 60 #include "remoting/protocol/me2me_host_authenticator_factory.h" |
59 | 61 |
60 #if defined(OS_POSIX) | 62 #if defined(OS_POSIX) |
61 #include <signal.h> | 63 #include <signal.h> |
62 #include "remoting/host/posix/signal_handler.h" | 64 #include "remoting/host/posix/signal_handler.h" |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 oauth_use_official_client_id_(false), | 125 oauth_use_official_client_id_(false), |
124 #endif | 126 #endif |
125 allow_nat_traversal_(true), | 127 allow_nat_traversal_(true), |
126 restarting_(false), | 128 restarting_(false), |
127 shutting_down_(false), | 129 shutting_down_(false), |
128 #if defined(OS_WIN) | 130 #if defined(OS_WIN) |
129 desktop_environment_factory_(new SessionDesktopEnvironmentFactory()), | 131 desktop_environment_factory_(new SessionDesktopEnvironmentFactory()), |
130 #else // !defined(OS_WIN) | 132 #else // !defined(OS_WIN) |
131 desktop_environment_factory_(new DesktopEnvironmentFactory()), | 133 desktop_environment_factory_(new DesktopEnvironmentFactory()), |
132 #endif // !defined(OS_WIN) | 134 #endif // !defined(OS_WIN) |
| 135 desktop_resizer_(DesktopResizer::Create()), |
| 136 resizing_host_observer_( |
| 137 new ResizingHostObserver(desktop_resizer_.get(), host_)), |
133 exit_code_(kSuccessExitCode) | 138 exit_code_(kSuccessExitCode) |
134 #if defined(OS_MACOSX) | 139 #if defined(OS_MACOSX) |
135 , curtain_(base::Bind(&HostProcess::OnDisconnectRequested, | 140 , curtain_(base::Bind(&HostProcess::OnDisconnectRequested, |
136 base::Unretained(this)), | 141 base::Unretained(this)), |
137 base::Bind(&HostProcess::OnDisconnectRequested, | 142 base::Bind(&HostProcess::OnDisconnectRequested, |
138 base::Unretained(this))) | 143 base::Unretained(this))) |
139 #endif | 144 #endif |
140 { | 145 { |
141 network_change_notifier_.reset(net::NetworkChangeNotifier::Create()); | 146 network_change_notifier_.reset(net::NetworkChangeNotifier::Create()); |
142 } | 147 } |
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
691 bool oauth_use_official_client_id_; | 696 bool oauth_use_official_client_id_; |
692 | 697 |
693 scoped_ptr<policy_hack::PolicyWatcher> policy_watcher_; | 698 scoped_ptr<policy_hack::PolicyWatcher> policy_watcher_; |
694 bool allow_nat_traversal_; | 699 bool allow_nat_traversal_; |
695 std::string talkgadget_prefix_; | 700 std::string talkgadget_prefix_; |
696 | 701 |
697 bool restarting_; | 702 bool restarting_; |
698 bool shutting_down_; | 703 bool shutting_down_; |
699 | 704 |
700 scoped_ptr<DesktopEnvironmentFactory> desktop_environment_factory_; | 705 scoped_ptr<DesktopEnvironmentFactory> desktop_environment_factory_; |
| 706 scoped_ptr<DesktopResizer> desktop_resizer_; |
| 707 scoped_ptr<ResizingHostObserver> resizing_host_observer_; |
701 scoped_ptr<XmppSignalStrategy> signal_strategy_; | 708 scoped_ptr<XmppSignalStrategy> signal_strategy_; |
702 scoped_ptr<SignalingConnector> signaling_connector_; | 709 scoped_ptr<SignalingConnector> signaling_connector_; |
703 scoped_ptr<HeartbeatSender> heartbeat_sender_; | 710 scoped_ptr<HeartbeatSender> heartbeat_sender_; |
704 scoped_ptr<LogToServer> log_to_server_; | 711 scoped_ptr<LogToServer> log_to_server_; |
705 scoped_ptr<HostEventLogger> host_event_logger_; | 712 scoped_ptr<HostEventLogger> host_event_logger_; |
706 | 713 |
707 #if defined(OS_MACOSX) || defined(OS_WIN) | 714 #if defined(OS_MACOSX) || defined(OS_WIN) |
708 scoped_ptr<HostUserInterface> host_user_interface_; | 715 scoped_ptr<HostUserInterface> host_user_interface_; |
709 #endif | 716 #endif |
710 | 717 |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
822 user32.GetFunctionPointer("SetProcessDPIAware")); | 829 user32.GetFunctionPointer("SetProcessDPIAware")); |
823 set_process_dpi_aware(); | 830 set_process_dpi_aware(); |
824 } | 831 } |
825 | 832 |
826 // CommandLine::Init() ignores the passed |argc| and |argv| on Windows getting | 833 // CommandLine::Init() ignores the passed |argc| and |argv| on Windows getting |
827 // the command line from GetCommandLineW(), so we can safely pass NULL here. | 834 // the command line from GetCommandLineW(), so we can safely pass NULL here. |
828 return main(0, NULL); | 835 return main(0, NULL); |
829 } | 836 } |
830 | 837 |
831 #endif // defined(OS_WIN) | 838 #endif // defined(OS_WIN) |
OLD | NEW |