[email protected] | ac115ce | 2013-04-24 20:44:38 | [diff] [blame] | 1 | // Copyright 2013 The Chromium Authors. All rights reserved. |
2 | // Use of this source code is governed by a BSD-style license that can be | ||||
3 | // found in the LICENSE file. | ||||
4 | |||||
5 | #ifndef REMOTING_HOST_IT2ME_DESKTOP_ENVIRONMENT_H_ | ||||
6 | #define REMOTING_HOST_IT2ME_DESKTOP_ENVIRONMENT_H_ | ||||
7 | |||||
dcheng | 0765c49 | 2016-04-06 22:41:53 | [diff] [blame] | 8 | #include <memory> |
9 | |||||
avi | c5960f3 | 2015-12-22 22:49:48 | [diff] [blame] | 10 | #include "base/macros.h" |
[email protected] | ac115ce | 2013-04-24 20:44:38 | [diff] [blame] | 11 | #include "base/memory/weak_ptr.h" |
Gabriel Charette | 5ff87ce | 2017-05-16 18:03:45 | [diff] [blame] | 12 | #include "base/single_thread_task_runner.h" |
[email protected] | ac115ce | 2013-04-24 20:44:38 | [diff] [blame] | 13 | #include "remoting/host/basic_desktop_environment.h" |
14 | |||||
15 | namespace remoting { | ||||
16 | |||||
17 | class HostWindow; | ||||
18 | class LocalInputMonitor; | ||||
19 | |||||
20 | // Same as BasicDesktopEnvironment but also presents the Continue window to | ||||
21 | // the local user. | ||||
22 | class It2MeDesktopEnvironment : public BasicDesktopEnvironment { | ||||
23 | public: | ||||
dcheng | 562aba5 | 2014-10-21 12:30:14 | [diff] [blame] | 24 | ~It2MeDesktopEnvironment() override; |
[email protected] | ac115ce | 2013-04-24 20:44:38 | [diff] [blame] | 25 | |
26 | protected: | ||||
27 | friend class It2MeDesktopEnvironmentFactory; | ||||
28 | It2MeDesktopEnvironment( | ||||
29 | scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, | ||||
sergeyu | 85df3c48 | 2016-02-15 05:59:08 | [diff] [blame] | 30 | scoped_refptr<base::SingleThreadTaskRunner> video_capture_task_runner, |
[email protected] | ac115ce | 2013-04-24 20:44:38 | [diff] [blame] | 31 | scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, |
32 | scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, | ||||
rkuroiwa | a7815e7 | 2015-06-05 21:39:04 | [diff] [blame] | 33 | base::WeakPtr<ClientSessionControl> client_session_control, |
zijiehe | 4aa6ea4 | 2016-11-12 01:28:16 | [diff] [blame] | 34 | const DesktopEnvironmentOptions& options); |
[email protected] | ac115ce | 2013-04-24 20:44:38 | [diff] [blame] | 35 | |
36 | private: | ||||
37 | // Presents the continue window to the local user. | ||||
dcheng | 0765c49 | 2016-04-06 22:41:53 | [diff] [blame] | 38 | std::unique_ptr<HostWindow> continue_window_; |
[email protected] | ac115ce | 2013-04-24 20:44:38 | [diff] [blame] | 39 | |
40 | // Presents the disconnect window to the local user. | ||||
dcheng | 0765c49 | 2016-04-06 22:41:53 | [diff] [blame] | 41 | std::unique_ptr<HostWindow> disconnect_window_; |
[email protected] | ac115ce | 2013-04-24 20:44:38 | [diff] [blame] | 42 | |
43 | // Notifies the client session about the local mouse movements. | ||||
dcheng | 0765c49 | 2016-04-06 22:41:53 | [diff] [blame] | 44 | std::unique_ptr<LocalInputMonitor> local_input_monitor_; |
[email protected] | ac115ce | 2013-04-24 20:44:38 | [diff] [blame] | 45 | |
46 | DISALLOW_COPY_AND_ASSIGN(It2MeDesktopEnvironment); | ||||
47 | }; | ||||
48 | |||||
49 | // Used to create |It2MeDesktopEnvironment| instances. | ||||
50 | class It2MeDesktopEnvironmentFactory : public BasicDesktopEnvironmentFactory { | ||||
51 | public: | ||||
52 | It2MeDesktopEnvironmentFactory( | ||||
53 | scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, | ||||
sergeyu | 85df3c48 | 2016-02-15 05:59:08 | [diff] [blame] | 54 | scoped_refptr<base::SingleThreadTaskRunner> video_capture_task_runner, |
[email protected] | ac115ce | 2013-04-24 20:44:38 | [diff] [blame] | 55 | scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, |
Scott Violet | 9778dcd | 2019-06-20 21:59:37 | [diff] [blame] | 56 | scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner); |
dcheng | 562aba5 | 2014-10-21 12:30:14 | [diff] [blame] | 57 | ~It2MeDesktopEnvironmentFactory() override; |
[email protected] | ac115ce | 2013-04-24 20:44:38 | [diff] [blame] | 58 | |
59 | // DesktopEnvironmentFactory interface. | ||||
dcheng | 0765c49 | 2016-04-06 22:41:53 | [diff] [blame] | 60 | std::unique_ptr<DesktopEnvironment> Create( |
zijiehe | 4aa6ea4 | 2016-11-12 01:28:16 | [diff] [blame] | 61 | base::WeakPtr<ClientSessionControl> client_session_control, |
62 | const DesktopEnvironmentOptions& options) override; | ||||
zijiehe | dd0b05c | 2016-05-05 18:44:15 | [diff] [blame] | 63 | |
[email protected] | ac115ce | 2013-04-24 20:44:38 | [diff] [blame] | 64 | private: |
[email protected] | ac115ce | 2013-04-24 20:44:38 | [diff] [blame] | 65 | DISALLOW_COPY_AND_ASSIGN(It2MeDesktopEnvironmentFactory); |
66 | }; | ||||
67 | |||||
68 | } // namespace remoting | ||||
69 | |||||
70 | #endif // REMOTING_HOST_IT2ME_DESKTOP_ENVIRONMENT_H_ |