| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 #include "remoting/host/config_watcher.h" | 46 #include "remoting/host/config_watcher.h" |
| 47 #include "remoting/host/desktop_environment.h" | 47 #include "remoting/host/desktop_environment.h" |
| 48 #include "remoting/host/desktop_session_connector.h" | 48 #include "remoting/host/desktop_session_connector.h" |
| 49 #include "remoting/host/host_change_notification_listener.h" | 49 #include "remoting/host/host_change_notification_listener.h" |
| 50 #include "remoting/host/host_config.h" | 50 #include "remoting/host/host_config.h" |
| 51 #include "remoting/host/host_event_logger.h" | 51 #include "remoting/host/host_event_logger.h" |
| 52 #include "remoting/host/host_exit_codes.h" | 52 #include "remoting/host/host_exit_codes.h" |
| 53 #include "remoting/host/host_main.h" | 53 #include "remoting/host/host_main.h" |
| 54 #include "remoting/host/host_signaling_manager.h" | 54 #include "remoting/host/host_signaling_manager.h" |
| 55 #include "remoting/host/host_status_logger.h" | 55 #include "remoting/host/host_status_logger.h" |
| 56 #include "remoting/host/input_injector.h" |
| 56 #include "remoting/host/ipc_constants.h" | 57 #include "remoting/host/ipc_constants.h" |
| 57 #include "remoting/host/ipc_desktop_environment.h" | 58 #include "remoting/host/ipc_desktop_environment.h" |
| 58 #include "remoting/host/ipc_host_event_logger.h" | 59 #include "remoting/host/ipc_host_event_logger.h" |
| 59 #include "remoting/host/logging.h" | 60 #include "remoting/host/logging.h" |
| 60 #include "remoting/host/me2me_desktop_environment.h" | 61 #include "remoting/host/me2me_desktop_environment.h" |
| 61 #include "remoting/host/pairing_registry_delegate.h" | 62 #include "remoting/host/pairing_registry_delegate.h" |
| 62 #include "remoting/host/policy_watcher.h" | 63 #include "remoting/host/policy_watcher.h" |
| 63 #include "remoting/host/session_manager_factory.h" | 64 #include "remoting/host/session_manager_factory.h" |
| 64 #include "remoting/host/shutdown_watchdog.h" | 65 #include "remoting/host/shutdown_watchdog.h" |
| 65 #include "remoting/host/signaling_connector.h" | 66 #include "remoting/host/signaling_connector.h" |
| (...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 811 desktop_environment_factory = | 812 desktop_environment_factory = |
| 812 new Me2MeDesktopEnvironmentFactory( | 813 new Me2MeDesktopEnvironmentFactory( |
| 813 context_->network_task_runner(), | 814 context_->network_task_runner(), |
| 814 context_->input_task_runner(), | 815 context_->input_task_runner(), |
| 815 context_->ui_task_runner()); | 816 context_->ui_task_runner()); |
| 816 } | 817 } |
| 817 #endif // !defined(OS_WIN) | 818 #endif // !defined(OS_WIN) |
| 818 | 819 |
| 819 desktop_environment_factory_.reset(desktop_environment_factory); | 820 desktop_environment_factory_.reset(desktop_environment_factory); |
| 820 desktop_environment_factory_->SetEnableGnubbyAuth(enable_gnubby_auth_); | 821 desktop_environment_factory_->SetEnableGnubbyAuth(enable_gnubby_auth_); |
| 822 desktop_environment_factory_->SetEnableMultiTouch( |
| 823 InputInjector::CanInjectTouch()); |
| 821 | 824 |
| 822 context_->network_task_runner()->PostTask( | 825 context_->network_task_runner()->PostTask( |
| 823 FROM_HERE, | 826 FROM_HERE, |
| 824 base::Bind(&HostProcess::StartOnNetworkThread, this)); | 827 base::Bind(&HostProcess::StartOnNetworkThread, this)); |
| 825 } | 828 } |
| 826 | 829 |
| 827 void HostProcess::ShutdownOnUiThread() { | 830 void HostProcess::ShutdownOnUiThread() { |
| 828 DCHECK(context_->ui_task_runner()->BelongsToCurrentThread()); | 831 DCHECK(context_->ui_task_runner()->BelongsToCurrentThread()); |
| 829 | 832 |
| 830 // Tear down resources that need to be torn down on the UI thread. | 833 // Tear down resources that need to be torn down on the UI thread. |
| (...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1560 base::TimeDelta::FromSeconds(kShutdownTimeoutSeconds)); | 1563 base::TimeDelta::FromSeconds(kShutdownTimeoutSeconds)); |
| 1561 new HostProcess(context.Pass(), &exit_code, &shutdown_watchdog); | 1564 new HostProcess(context.Pass(), &exit_code, &shutdown_watchdog); |
| 1562 | 1565 |
| 1563 // Run the main (also UI) message loop until the host no longer needs it. | 1566 // Run the main (also UI) message loop until the host no longer needs it. |
| 1564 message_loop.Run(); | 1567 message_loop.Run(); |
| 1565 | 1568 |
| 1566 return exit_code; | 1569 return exit_code; |
| 1567 } | 1570 } |
| 1568 | 1571 |
| 1569 } // namespace remoting | 1572 } // namespace remoting |
| OLD | NEW |