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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 #include "remoting/host/ipc_constants.h" | 54 #include "remoting/host/ipc_constants.h" |
55 #include "remoting/host/ipc_desktop_environment_factory.h" | 55 #include "remoting/host/ipc_desktop_environment_factory.h" |
56 #include "remoting/host/json_host_config.h" | 56 #include "remoting/host/json_host_config.h" |
57 #include "remoting/host/log_to_server.h" | 57 #include "remoting/host/log_to_server.h" |
58 #include "remoting/host/logging.h" | 58 #include "remoting/host/logging.h" |
59 #include "remoting/host/network_settings.h" | 59 #include "remoting/host/network_settings.h" |
60 #include "remoting/host/policy_hack/policy_watcher.h" | 60 #include "remoting/host/policy_hack/policy_watcher.h" |
61 #include "remoting/host/resizing_host_observer.h" | 61 #include "remoting/host/resizing_host_observer.h" |
62 #include "remoting/host/session_manager_factory.h" | 62 #include "remoting/host/session_manager_factory.h" |
63 #include "remoting/host/signaling_connector.h" | 63 #include "remoting/host/signaling_connector.h" |
| 64 #include "remoting/host/ui_strings.h" |
64 #include "remoting/host/usage_stats_consent.h" | 65 #include "remoting/host/usage_stats_consent.h" |
65 #include "remoting/jingle_glue/xmpp_signal_strategy.h" | 66 #include "remoting/jingle_glue/xmpp_signal_strategy.h" |
66 #include "remoting/protocol/me2me_host_authenticator_factory.h" | 67 #include "remoting/protocol/me2me_host_authenticator_factory.h" |
67 | 68 |
68 #if defined(OS_POSIX) | 69 #if defined(OS_POSIX) |
69 #include <pwd.h> | 70 #include <pwd.h> |
70 #include <signal.h> | 71 #include <signal.h> |
71 #include "base/file_descriptor_posix.h" | 72 #include "base/file_descriptor_posix.h" |
72 #include "remoting/host/pam_authorization_factory_posix.h" | 73 #include "remoting/host/pam_authorization_factory_posix.h" |
73 #include "remoting/host/posix/signal_handler.h" | 74 #include "remoting/host/posix/signal_handler.h" |
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
600 // is rejected by the Window Server on OS X 10.7.4, and prevents the | 601 // is rejected by the Window Server on OS X 10.7.4, and prevents the |
601 // capturer from working (http://crbug.com/140984). | 602 // capturer from working (http://crbug.com/140984). |
602 | 603 |
603 // TODO(lambroslambrou): Use a better technique of detecting whether we're | 604 // TODO(lambroslambrou): Use a better technique of detecting whether we're |
604 // running in the LoginWindow context, and refactor this into a separate | 605 // running in the LoginWindow context, and refactor this into a separate |
605 // function to be used here and in CurtainMode::ActivateCurtain(). | 606 // function to be used here and in CurtainMode::ActivateCurtain(). |
606 want_user_interface = getuid() != 0; | 607 want_user_interface = getuid() != 0; |
607 #endif // OS_MACOSX | 608 #endif // OS_MACOSX |
608 | 609 |
609 if (want_user_interface) { | 610 if (want_user_interface) { |
| 611 UiStrings ui_strings; |
610 host_user_interface_.reset( | 612 host_user_interface_.reset( |
611 new HostUserInterface(context_->network_task_runner(), | 613 new HostUserInterface(context_->network_task_runner(), |
612 context_->ui_task_runner())); | 614 context_->ui_task_runner(), ui_strings)); |
613 host_user_interface_->Init(); | 615 host_user_interface_->Init(); |
614 } | 616 } |
615 | 617 |
616 context_->network_task_runner()->PostTask( | 618 context_->network_task_runner()->PostTask( |
617 FROM_HERE, | 619 FROM_HERE, |
618 base::Bind(&HostProcess::StartOnNetworkThread, this)); | 620 base::Bind(&HostProcess::StartOnNetworkThread, this)); |
619 } | 621 } |
620 | 622 |
621 void HostProcess::SendSasToConsole() { | 623 void HostProcess::SendSasToConsole() { |
622 DCHECK(context_->ui_task_runner()->BelongsToCurrentThread()); | 624 DCHECK(context_->ui_task_runner()->BelongsToCurrentThread()); |
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1140 user32.GetFunctionPointer("SetProcessDPIAware")); | 1142 user32.GetFunctionPointer("SetProcessDPIAware")); |
1141 set_process_dpi_aware(); | 1143 set_process_dpi_aware(); |
1142 } | 1144 } |
1143 | 1145 |
1144 // CommandLine::Init() ignores the passed |argc| and |argv| on Windows getting | 1146 // CommandLine::Init() ignores the passed |argc| and |argv| on Windows getting |
1145 // the command line from GetCommandLineW(), so we can safely pass NULL here. | 1147 // the command line from GetCommandLineW(), so we can safely pass NULL here. |
1146 return main(0, NULL); | 1148 return main(0, NULL); |
1147 } | 1149 } |
1148 | 1150 |
1149 #endif // defined(OS_WIN) | 1151 #endif // defined(OS_WIN) |
OLD | NEW |