Chromium Code Reviews| 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 <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 166 static scoped_ptr<VideoEncoder> CreateVideoEncoder( | 166 static scoped_ptr<VideoEncoder> CreateVideoEncoder( |
| 167 const protocol::SessionConfig& config); | 167 const protocol::SessionConfig& config); |
| 168 | 168 |
| 169 EventHandler* event_handler_; | 169 EventHandler* event_handler_; |
| 170 | 170 |
| 171 // The connection to the client. | 171 // The connection to the client. |
| 172 scoped_ptr<protocol::ConnectionToClient> connection_; | 172 scoped_ptr<protocol::ConnectionToClient> connection_; |
| 173 | 173 |
| 174 std::string client_jid_; | 174 std::string client_jid_; |
| 175 | 175 |
| 176 // Used to disable callbacks to |this| once DisconnectSession() has been | |
| 177 // called. | |
| 178 base::WeakPtrFactory<ClientSessionControl> control_factory_; | |
| 179 | |
| 180 // Used to create a DesktopEnvironment instance for this session. | 176 // Used to create a DesktopEnvironment instance for this session. |
| 181 DesktopEnvironmentFactory* desktop_environment_factory_; | 177 DesktopEnvironmentFactory* desktop_environment_factory_; |
| 182 | 178 |
| 183 // The DesktopEnvironment instance for this session. | 179 // The DesktopEnvironment instance for this session. |
| 184 scoped_ptr<DesktopEnvironment> desktop_environment_; | 180 scoped_ptr<DesktopEnvironment> desktop_environment_; |
| 185 | 181 |
| 186 // Filter used as the final element in the input pipeline. | 182 // Filter used as the final element in the input pipeline. |
| 187 protocol::InputFilter host_input_filter_; | 183 protocol::InputFilter host_input_filter_; |
| 188 | 184 |
| 189 // Tracker used to release pressed keys and buttons when disconnecting. | 185 // Tracker used to release pressed keys and buttons when disconnecting. |
| (...skipping 11 matching lines...) Expand all Loading... | |
| 201 protocol::ClipboardEchoFilter clipboard_echo_filter_; | 197 protocol::ClipboardEchoFilter clipboard_echo_filter_; |
| 202 | 198 |
| 203 // Filters used to manage enabling & disabling of input & clipboard. | 199 // Filters used to manage enabling & disabling of input & clipboard. |
| 204 protocol::InputFilter disable_input_filter_; | 200 protocol::InputFilter disable_input_filter_; |
| 205 protocol::ClipboardFilter disable_clipboard_filter_; | 201 protocol::ClipboardFilter disable_clipboard_filter_; |
| 206 | 202 |
| 207 // Filters used to disable input & clipboard when we're not authenticated. | 203 // Filters used to disable input & clipboard when we're not authenticated. |
| 208 protocol::InputFilter auth_input_filter_; | 204 protocol::InputFilter auth_input_filter_; |
| 209 protocol::ClipboardFilter auth_clipboard_filter_; | 205 protocol::ClipboardFilter auth_clipboard_filter_; |
| 210 | 206 |
| 211 // Factory for weak pointers to the client clipboard stub. | |
| 212 // This must appear after |clipboard_echo_filter_|, so that it won't outlive | |
| 213 // it. | |
| 214 base::WeakPtrFactory<protocol::ClipboardStub> client_clipboard_factory_; | |
|
Wez
2014/09/18 17:53:57
This can stay where it is, since it doesn't refer
| |
| 215 | |
| 216 // The maximum duration of this session. | 207 // The maximum duration of this session. |
| 217 // There is no maximum if this value is <= 0. | 208 // There is no maximum if this value is <= 0. |
| 218 base::TimeDelta max_duration_; | 209 base::TimeDelta max_duration_; |
| 219 | 210 |
| 220 // A timer that triggers a disconnect when the maximum session duration | 211 // A timer that triggers a disconnect when the maximum session duration |
| 221 // is reached. | 212 // is reached. |
| 222 base::OneShotTimer<ClientSession> max_duration_timer_; | 213 base::OneShotTimer<ClientSession> max_duration_timer_; |
| 223 | 214 |
| 224 scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner_; | 215 scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner_; |
| 225 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner_; | 216 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner_; |
| (...skipping 30 matching lines...) Expand all Loading... | |
| 256 scoped_ptr<GnubbyAuthHandler> gnubby_auth_handler_; | 247 scoped_ptr<GnubbyAuthHandler> gnubby_auth_handler_; |
| 257 | 248 |
| 258 // Used to manage extension functionality. | 249 // Used to manage extension functionality. |
| 259 scoped_ptr<HostExtensionSessionManager> extension_manager_; | 250 scoped_ptr<HostExtensionSessionManager> extension_manager_; |
| 260 | 251 |
| 261 // Used to store video channel pause & lossless parameters. | 252 // Used to store video channel pause & lossless parameters. |
| 262 bool pause_video_; | 253 bool pause_video_; |
| 263 bool lossless_video_encode_; | 254 bool lossless_video_encode_; |
| 264 bool lossless_video_color_; | 255 bool lossless_video_color_; |
| 265 | 256 |
| 257 // Used to disable callbacks to |this| once DisconnectSession() has been | |
| 258 // called. | |
| 259 base::WeakPtrFactory<ClientSessionControl> weak_factory_; | |
| 260 | |
| 261 // Factory for weak pointers to the client clipboard stub. | |
| 262 // This must appear after |clipboard_echo_filter_|, so that it won't outlive | |
| 263 // it. | |
| 264 base::WeakPtrFactory<protocol::ClipboardStub> client_clipboard_factory_; | |
| 265 | |
| 266 DISALLOW_COPY_AND_ASSIGN(ClientSession); | 266 DISALLOW_COPY_AND_ASSIGN(ClientSession); |
| 267 }; | 267 }; |
| 268 | 268 |
| 269 } // namespace remoting | 269 } // namespace remoting |
| 270 | 270 |
| 271 #endif // REMOTING_HOST_CLIENT_SESSION_H_ | 271 #endif // REMOTING_HOST_CLIENT_SESSION_H_ |
| OLD | NEW |