| 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/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 #include "remoting/host/desktop_environment.h" | 45 #include "remoting/host/desktop_environment.h" |
| 46 #include "remoting/host/desktop_session_connector.h" | 46 #include "remoting/host/desktop_session_connector.h" |
| 47 #include "remoting/host/dns_blackhole_checker.h" | 47 #include "remoting/host/dns_blackhole_checker.h" |
| 48 #include "remoting/host/heartbeat_sender.h" | 48 #include "remoting/host/heartbeat_sender.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_status_logger.h" | 54 #include "remoting/host/host_status_logger.h" |
| 55 #include "remoting/host/input_injector.h" |
| 55 #include "remoting/host/ipc_constants.h" | 56 #include "remoting/host/ipc_constants.h" |
| 56 #include "remoting/host/ipc_desktop_environment.h" | 57 #include "remoting/host/ipc_desktop_environment.h" |
| 57 #include "remoting/host/ipc_host_event_logger.h" | 58 #include "remoting/host/ipc_host_event_logger.h" |
| 58 #include "remoting/host/logging.h" | 59 #include "remoting/host/logging.h" |
| 59 #include "remoting/host/me2me_desktop_environment.h" | 60 #include "remoting/host/me2me_desktop_environment.h" |
| 60 #include "remoting/host/oauth_token_getter_impl.h" | 61 #include "remoting/host/oauth_token_getter_impl.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" |
| (...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 797 #if defined(OS_WIN) | 798 #if defined(OS_WIN) |
| 798 IpcDesktopEnvironmentFactory* desktop_environment_factory = | 799 IpcDesktopEnvironmentFactory* desktop_environment_factory = |
| 799 new IpcDesktopEnvironmentFactory( | 800 new IpcDesktopEnvironmentFactory( |
| 800 context_->audio_task_runner(), | 801 context_->audio_task_runner(), |
| 801 context_->network_task_runner(), | 802 context_->network_task_runner(), |
| 802 context_->video_capture_task_runner(), | 803 context_->video_capture_task_runner(), |
| 803 context_->network_task_runner(), | 804 context_->network_task_runner(), |
| 804 daemon_channel_.get()); | 805 daemon_channel_.get()); |
| 805 desktop_session_connector_ = desktop_environment_factory; | 806 desktop_session_connector_ = desktop_environment_factory; |
| 806 #else // !defined(OS_WIN) | 807 #else // !defined(OS_WIN) |
| 807 DesktopEnvironmentFactory* desktop_environment_factory; | 808 BasicDesktopEnvironmentFactory* desktop_environment_factory; |
| 808 if (enable_window_capture_) { | 809 if (enable_window_capture_) { |
| 809 desktop_environment_factory = | 810 desktop_environment_factory = |
| 810 new SingleWindowDesktopEnvironmentFactory( | 811 new SingleWindowDesktopEnvironmentFactory( |
| 811 context_->network_task_runner(), | 812 context_->network_task_runner(), |
| 812 context_->input_task_runner(), | 813 context_->input_task_runner(), |
| 813 context_->ui_task_runner(), | 814 context_->ui_task_runner(), |
| 814 window_id_); | 815 window_id_); |
| 815 } else { | 816 } else { |
| 816 desktop_environment_factory = | 817 desktop_environment_factory = |
| 817 new Me2MeDesktopEnvironmentFactory( | 818 new Me2MeDesktopEnvironmentFactory( |
| 818 context_->network_task_runner(), | 819 context_->network_task_runner(), |
| 819 context_->input_task_runner(), | 820 context_->input_task_runner(), |
| 820 context_->ui_task_runner()); | 821 context_->ui_task_runner()); |
| 821 } | 822 } |
| 822 #endif // !defined(OS_WIN) | 823 #endif // !defined(OS_WIN) |
| 824 desktop_environment_factory->set_supports_touch_events( |
| 825 InputInjector::SupportsTouchEvents()); |
| 823 | 826 |
| 824 desktop_environment_factory_.reset(desktop_environment_factory); | 827 desktop_environment_factory_.reset(desktop_environment_factory); |
| 825 desktop_environment_factory_->SetEnableGnubbyAuth(enable_gnubby_auth_); | 828 desktop_environment_factory_->SetEnableGnubbyAuth(enable_gnubby_auth_); |
| 826 | 829 |
| 827 context_->network_task_runner()->PostTask( | 830 context_->network_task_runner()->PostTask( |
| 828 FROM_HERE, | 831 FROM_HERE, |
| 829 base::Bind(&HostProcess::StartOnNetworkThread, this)); | 832 base::Bind(&HostProcess::StartOnNetworkThread, this)); |
| 830 } | 833 } |
| 831 | 834 |
| 832 void HostProcess::ShutdownOnUiThread() { | 835 void HostProcess::ShutdownOnUiThread() { |
| (...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1578 base::TimeDelta::FromSeconds(kShutdownTimeoutSeconds)); | 1581 base::TimeDelta::FromSeconds(kShutdownTimeoutSeconds)); |
| 1579 new HostProcess(context.Pass(), &exit_code, &shutdown_watchdog); | 1582 new HostProcess(context.Pass(), &exit_code, &shutdown_watchdog); |
| 1580 | 1583 |
| 1581 // Run the main (also UI) message loop until the host no longer needs it. | 1584 // Run the main (also UI) message loop until the host no longer needs it. |
| 1582 message_loop.Run(); | 1585 message_loop.Run(); |
| 1583 | 1586 |
| 1584 return exit_code; | 1587 return exit_code; |
| 1585 } | 1588 } |
| 1586 | 1589 |
| 1587 } // namespace remoting | 1590 } // namespace remoting |
| OLD | NEW |