OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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 #ifndef REMOTING_HOST_IT2ME_DESKTOP_ENVIRONMENT_H_ | 5 #ifndef REMOTING_HOST_IT2ME_DESKTOP_ENVIRONMENT_H_ |
6 #define REMOTING_HOST_IT2ME_DESKTOP_ENVIRONMENT_H_ | 6 #define REMOTING_HOST_IT2ME_DESKTOP_ENVIRONMENT_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 ~It2MeDesktopEnvironment() override; | 23 ~It2MeDesktopEnvironment() override; |
24 | 24 |
25 protected: | 25 protected: |
26 friend class It2MeDesktopEnvironmentFactory; | 26 friend class It2MeDesktopEnvironmentFactory; |
27 It2MeDesktopEnvironment( | 27 It2MeDesktopEnvironment( |
28 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, | 28 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, |
29 scoped_refptr<base::SingleThreadTaskRunner> video_capture_task_runner, | 29 scoped_refptr<base::SingleThreadTaskRunner> video_capture_task_runner, |
30 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, | 30 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, |
31 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, | 31 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, |
32 base::WeakPtr<ClientSessionControl> client_session_control, | 32 base::WeakPtr<ClientSessionControl> client_session_control, |
33 bool supports_touch_events); | 33 bool supports_touch_events, |
| 34 bool enable_user_interface); |
34 | 35 |
35 private: | 36 private: |
36 // Presents the continue window to the local user. | 37 // Presents the continue window to the local user. |
37 std::unique_ptr<HostWindow> continue_window_; | 38 std::unique_ptr<HostWindow> continue_window_; |
38 | 39 |
39 // Presents the disconnect window to the local user. | 40 // Presents the disconnect window to the local user. |
40 std::unique_ptr<HostWindow> disconnect_window_; | 41 std::unique_ptr<HostWindow> disconnect_window_; |
41 | 42 |
42 // Notifies the client session about the local mouse movements. | 43 // Notifies the client session about the local mouse movements. |
43 std::unique_ptr<LocalInputMonitor> local_input_monitor_; | 44 std::unique_ptr<LocalInputMonitor> local_input_monitor_; |
44 | 45 |
45 DISALLOW_COPY_AND_ASSIGN(It2MeDesktopEnvironment); | 46 DISALLOW_COPY_AND_ASSIGN(It2MeDesktopEnvironment); |
46 }; | 47 }; |
47 | 48 |
48 // Used to create |It2MeDesktopEnvironment| instances. | 49 // Used to create |It2MeDesktopEnvironment| instances. |
49 class It2MeDesktopEnvironmentFactory : public BasicDesktopEnvironmentFactory { | 50 class It2MeDesktopEnvironmentFactory : public BasicDesktopEnvironmentFactory { |
50 public: | 51 public: |
51 It2MeDesktopEnvironmentFactory( | 52 It2MeDesktopEnvironmentFactory( |
52 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, | 53 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, |
53 scoped_refptr<base::SingleThreadTaskRunner> video_capture_task_runner, | 54 scoped_refptr<base::SingleThreadTaskRunner> video_capture_task_runner, |
54 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, | 55 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, |
55 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner); | 56 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner); |
56 ~It2MeDesktopEnvironmentFactory() override; | 57 ~It2MeDesktopEnvironmentFactory() override; |
57 | 58 |
58 // DesktopEnvironmentFactory interface. | 59 // DesktopEnvironmentFactory interface. |
59 std::unique_ptr<DesktopEnvironment> Create( | 60 std::unique_ptr<DesktopEnvironment> Create( |
60 base::WeakPtr<ClientSessionControl> client_session_control) override; | 61 base::WeakPtr<ClientSessionControl> client_session_control) override; |
61 | 62 |
| 63 void set_enable_user_interface(bool enabled) { |
| 64 enable_user_interface_ = enabled; |
| 65 } |
| 66 |
62 private: | 67 private: |
| 68 bool enable_user_interface_ = true; |
| 69 |
63 DISALLOW_COPY_AND_ASSIGN(It2MeDesktopEnvironmentFactory); | 70 DISALLOW_COPY_AND_ASSIGN(It2MeDesktopEnvironmentFactory); |
64 }; | 71 }; |
65 | 72 |
66 } // namespace remoting | 73 } // namespace remoting |
67 | 74 |
68 #endif // REMOTING_HOST_IT2ME_DESKTOP_ENVIRONMENT_H_ | 75 #endif // REMOTING_HOST_IT2ME_DESKTOP_ENVIRONMENT_H_ |
OLD | NEW |