| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <cstdint> | 9 #include <cstdint> |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 828 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 839 if (enable_window_capture_) { | 839 if (enable_window_capture_) { |
| 840 desktop_environment_factory = new SingleWindowDesktopEnvironmentFactory( | 840 desktop_environment_factory = new SingleWindowDesktopEnvironmentFactory( |
| 841 context_->network_task_runner(), context_->video_capture_task_runner(), | 841 context_->network_task_runner(), context_->video_capture_task_runner(), |
| 842 context_->input_task_runner(), context_->ui_task_runner(), window_id_); | 842 context_->input_task_runner(), context_->ui_task_runner(), window_id_); |
| 843 } else { | 843 } else { |
| 844 desktop_environment_factory = new Me2MeDesktopEnvironmentFactory( | 844 desktop_environment_factory = new Me2MeDesktopEnvironmentFactory( |
| 845 context_->network_task_runner(), context_->video_capture_task_runner(), | 845 context_->network_task_runner(), context_->video_capture_task_runner(), |
| 846 context_->input_task_runner(), context_->ui_task_runner()); | 846 context_->input_task_runner(), context_->ui_task_runner()); |
| 847 } | 847 } |
| 848 #endif // !defined(REMOTING_MULTI_PROCESS) | 848 #endif // !defined(REMOTING_MULTI_PROCESS) |
| 849 desktop_environment_factory->set_supports_touch_events( | |
| 850 InputInjector::SupportsTouchEvents()); | |
| 851 | 849 |
| 852 desktop_environment_factory_.reset(desktop_environment_factory); | 850 desktop_environment_factory_.reset(desktop_environment_factory); |
| 853 | 851 |
| 854 context_->network_task_runner()->PostTask( | 852 context_->network_task_runner()->PostTask( |
| 855 FROM_HERE, | 853 FROM_HERE, |
| 856 base::Bind(&HostProcess::StartOnNetworkThread, this)); | 854 base::Bind(&HostProcess::StartOnNetworkThread, this)); |
| 857 } | 855 } |
| 858 | 856 |
| 859 void HostProcess::ShutdownOnUiThread() { | 857 void HostProcess::ShutdownOnUiThread() { |
| 860 DCHECK(context_->ui_task_runner()->BelongsToCurrentThread()); | 858 DCHECK(context_->ui_task_runner()->BelongsToCurrentThread()); |
| (...skipping 798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1659 base::TimeDelta::FromSeconds(kShutdownTimeoutSeconds)); | 1657 base::TimeDelta::FromSeconds(kShutdownTimeoutSeconds)); |
| 1660 new HostProcess(std::move(context), &exit_code, &shutdown_watchdog); | 1658 new HostProcess(std::move(context), &exit_code, &shutdown_watchdog); |
| 1661 | 1659 |
| 1662 // Run the main (also UI) message loop until the host no longer needs it. | 1660 // Run the main (also UI) message loop until the host no longer needs it. |
| 1663 base::RunLoop().Run(); | 1661 base::RunLoop().Run(); |
| 1664 | 1662 |
| 1665 return exit_code; | 1663 return exit_code; |
| 1666 } | 1664 } |
| 1667 | 1665 |
| 1668 } // namespace remoting | 1666 } // namespace remoting |
| OLD | NEW |