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 #ifndef REMOTING_HOST_CLIENT_SESSION_H_ | 5 #ifndef REMOTING_HOST_CLIENT_SESSION_H_ |
6 #define REMOTING_HOST_CLIENT_SESSION_H_ | 6 #define REMOTING_HOST_CLIENT_SESSION_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 // connected. | 74 // connected. |
75 virtual void OnSessionRouteChange( | 75 virtual void OnSessionRouteChange( |
76 ClientSession* client, | 76 ClientSession* client, |
77 const std::string& channel_name, | 77 const std::string& channel_name, |
78 const protocol::TransportRoute& route) = 0; | 78 const protocol::TransportRoute& route) = 0; |
79 | 79 |
80 protected: | 80 protected: |
81 virtual ~EventHandler() {} | 81 virtual ~EventHandler() {} |
82 }; | 82 }; |
83 | 83 |
84 // |event_handler| must outlive |this|. |desktop_environment_factory| is only | 84 // |event_handler| and |desktop_environment_factory| must outlive |this|. |
85 // used by the constructor to create an instance of DesktopEnvironment. | |
86 ClientSession( | 85 ClientSession( |
87 EventHandler* event_handler, | 86 EventHandler* event_handler, |
88 scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner, | 87 scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner, |
89 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, | 88 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, |
90 scoped_refptr<base::SingleThreadTaskRunner> video_capture_task_runner, | 89 scoped_refptr<base::SingleThreadTaskRunner> video_capture_task_runner, |
91 scoped_refptr<base::SingleThreadTaskRunner> video_encode_task_runner, | 90 scoped_refptr<base::SingleThreadTaskRunner> video_encode_task_runner, |
92 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner, | 91 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner, |
93 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, | 92 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, |
94 scoped_ptr<protocol::ConnectionToClient> connection, | 93 scoped_ptr<protocol::ConnectionToClient> connection, |
95 DesktopEnvironmentFactory* desktop_environment_factory, | 94 DesktopEnvironmentFactory* desktop_environment_factory, |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 EventHandler* event_handler_; | 154 EventHandler* event_handler_; |
156 | 155 |
157 // The connection to the client. | 156 // The connection to the client. |
158 scoped_ptr<protocol::ConnectionToClient> connection_; | 157 scoped_ptr<protocol::ConnectionToClient> connection_; |
159 | 158 |
160 // Used to disable callbacks to |connection_| once it is disconnected. | 159 // Used to disable callbacks to |connection_| once it is disconnected. |
161 base::WeakPtrFactory<protocol::ConnectionToClient> connection_factory_; | 160 base::WeakPtrFactory<protocol::ConnectionToClient> connection_factory_; |
162 | 161 |
163 std::string client_jid_; | 162 std::string client_jid_; |
164 | 163 |
165 // The desktop environment used by this session. | 164 // Used to create a DesktopEnvironment instance for this session. |
166 scoped_ptr<DesktopEnvironment> desktop_environment_; | 165 DesktopEnvironmentFactory* desktop_environment_factory_; |
167 | 166 |
168 // Filter used as the final element in the input pipeline. | 167 // Filter used as the final element in the input pipeline. |
169 protocol::InputFilter host_input_filter_; | 168 protocol::InputFilter host_input_filter_; |
170 | 169 |
171 // Tracker used to release pressed keys and buttons when disconnecting. | 170 // Tracker used to release pressed keys and buttons when disconnecting. |
172 protocol::InputEventTracker input_tracker_; | 171 protocol::InputEventTracker input_tracker_; |
173 | 172 |
174 // Filter used to disable remote inputs during local input activity. | 173 // Filter used to disable remote inputs during local input activity. |
175 RemoteInputFilter remote_input_filter_; | 174 RemoteInputFilter remote_input_filter_; |
176 | 175 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 scoped_ptr<EventExecutor> event_executor_; | 216 scoped_ptr<EventExecutor> event_executor_; |
218 | 217 |
219 scoped_ptr<SessionController> session_controller_; | 218 scoped_ptr<SessionController> session_controller_; |
220 | 219 |
221 DISALLOW_COPY_AND_ASSIGN(ClientSession); | 220 DISALLOW_COPY_AND_ASSIGN(ClientSession); |
222 }; | 221 }; |
223 | 222 |
224 } // namespace remoting | 223 } // namespace remoting |
225 | 224 |
226 #endif // REMOTING_HOST_CLIENT_SESSION_H_ | 225 #endif // REMOTING_HOST_CLIENT_SESSION_H_ |
OLD | NEW |