[email protected] | 91e4b7f6 | 2012-01-25 23:23:02 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
[email protected] | 44f6076 | 2011-03-23 12:13:35 | [diff] [blame] | 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_CLIENT_SESSION_H_ |
| 6 | #define REMOTING_HOST_CLIENT_SESSION_H_ |
| 7 | |
joedow | 4fa09d9 | 2016-06-27 21:26:17 | [diff] [blame] | 8 | #include <cstdint> |
| 9 | #include <memory> |
[email protected] | a5d181f | 2013-04-19 14:55:37 | [diff] [blame] | 10 | #include <string> |
[email protected] | c78669c9 | 2011-06-13 22:42:38 | [diff] [blame] | 11 | |
avi | c5960f3 | 2015-12-22 22:49:48 | [diff] [blame] | 12 | #include "base/macros.h" |
[email protected] | 170cba4 | 2012-09-12 22:28:39 | [diff] [blame] | 13 | #include "base/memory/ref_counted.h" |
[email protected] | ce404ca | 2013-01-16 17:23:53 | [diff] [blame] | 14 | #include "base/memory/weak_ptr.h" |
gab | bf77513a | 2017-06-01 14:35:34 | [diff] [blame^] | 15 | #include "base/sequence_checker.h" |
[email protected] | fb44196 | 2013-05-08 05:35:24 | [diff] [blame] | 16 | #include "base/sequenced_task_runner_helpers.h" |
[email protected] | 5d7eb86 | 2013-06-28 15:21:24 | [diff] [blame] | 17 | #include "base/time/time.h" |
| 18 | #include "base/timer/timer.h" |
[email protected] | 231316a | 2013-03-25 06:01:12 | [diff] [blame] | 19 | #include "remoting/host/client_session_control.h" |
joedow | 4fa09d9 | 2016-06-27 21:26:17 | [diff] [blame] | 20 | #include "remoting/host/client_session_details.h" |
zijiehe | 4aa6ea4 | 2016-11-12 01:28:16 | [diff] [blame] | 21 | #include "remoting/host/desktop_environment_options.h" |
zijiehe | f38c972 | 2017-02-08 02:05:29 | [diff] [blame] | 22 | #include "remoting/host/host_experiment_session_plugin.h" |
[email protected] | 1b478ba | 2014-07-31 12:51:43 | [diff] [blame] | 23 | #include "remoting/host/host_extension_session_manager.h" |
[email protected] | 86cbe6b | 2012-04-03 00:56:18 | [diff] [blame] | 24 | #include "remoting/host/remote_input_filter.h" |
[email protected] | ff3761a1 | 2012-05-22 22:29:24 | [diff] [blame] | 25 | #include "remoting/protocol/clipboard_echo_filter.h" |
[email protected] | 34df2ab | 2012-08-19 06:54:23 | [diff] [blame] | 26 | #include "remoting/protocol/clipboard_filter.h" |
[email protected] | e265ad7 | 2012-03-16 17:28:03 | [diff] [blame] | 27 | #include "remoting/protocol/clipboard_stub.h" |
[email protected] | 44f6076 | 2011-03-23 12:13:35 | [diff] [blame] | 28 | #include "remoting/protocol/connection_to_client.h" |
| 29 | #include "remoting/protocol/host_stub.h" |
[email protected] | 86cbe6b | 2012-04-03 00:56:18 | [diff] [blame] | 30 | #include "remoting/protocol/input_event_tracker.h" |
| 31 | #include "remoting/protocol/input_filter.h" |
| 32 | #include "remoting/protocol/input_stub.h" |
sergeyu | a609b7a | 2015-11-30 06:25:39 | [diff] [blame] | 33 | #include "remoting/protocol/mouse_input_filter.h" |
[email protected] | 8835692 | 2013-06-04 06:26:01 | [diff] [blame] | 34 | #include "remoting/protocol/pairing_registry.h" |
sergeyu | ad51be8 | 2016-06-22 06:04:39 | [diff] [blame] | 35 | #include "remoting/protocol/video_stream.h" |
[email protected] | 8c83a71c | 2013-12-16 18:02:58 | [diff] [blame] | 36 | #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h" |
[email protected] | 44f6076 | 2011-03-23 12:13:35 | [diff] [blame] | 37 | |
[email protected] | 44f6076 | 2011-03-23 12:13:35 | [diff] [blame] | 38 | namespace remoting { |
| 39 | |
sergeyu | cd16e206 | 2016-09-12 19:28:35 | [diff] [blame] | 40 | class AudioStream; |
[email protected] | 170cba4 | 2012-09-12 22:28:39 | [diff] [blame] | 41 | class DesktopEnvironment; |
[email protected] | 8190479 | 2012-10-18 04:16:28 | [diff] [blame] | 42 | class DesktopEnvironmentFactory; |
[email protected] | b0b72f11 | 2013-03-24 03:42:42 | [diff] [blame] | 43 | class InputInjector; |
sergeyu | 1afb35a1 | 2015-02-13 18:45:30 | [diff] [blame] | 44 | class MouseShapePump; |
[email protected] | 231316a | 2013-03-25 06:01:12 | [diff] [blame] | 45 | class ScreenControls; |
sergeyu | 4d20800 | 2015-11-23 22:27:43 | [diff] [blame] | 46 | |
sergeyu | 9102cff | 2016-04-07 19:14:01 | [diff] [blame] | 47 | namespace protocol { |
| 48 | class VideoLayout; |
| 49 | } // namespace protocol |
| 50 | |
[email protected] | 44f6076 | 2011-03-23 12:13:35 | [diff] [blame] | 51 | // A ClientSession keeps a reference to a connection to a client, and maintains |
| 52 | // per-client state. |
gab | bf77513a | 2017-06-01 14:35:34 | [diff] [blame^] | 53 | class ClientSession : public protocol::HostStub, |
sergeyu | 9102cff | 2016-04-07 19:14:01 | [diff] [blame] | 54 | public protocol::ConnectionToClient::EventHandler, |
sergeyu | ad51be8 | 2016-06-22 06:04:39 | [diff] [blame] | 55 | public protocol::VideoStream::Observer, |
joedow | 4fa09d9 | 2016-06-27 21:26:17 | [diff] [blame] | 56 | public ClientSessionControl, |
| 57 | public ClientSessionDetails { |
[email protected] | 44f6076 | 2011-03-23 12:13:35 | [diff] [blame] | 58 | public: |
| 59 | // Callback interface for passing events to the ChromotingHost. |
| 60 | class EventHandler { |
| 61 | public: |
[email protected] | 064128c | 2014-04-07 22:33:28 | [diff] [blame] | 62 | // Called after authentication has started. |
| 63 | virtual void OnSessionAuthenticating(ClientSession* client) = 0; |
| 64 | |
sergeyu | 21c899e | 2015-11-24 16:39:55 | [diff] [blame] | 65 | // Called after authentication has finished successfully. |
| 66 | virtual void OnSessionAuthenticated(ClientSession* client) = 0; |
[email protected] | 1f249e2 | 2011-11-29 20:19:59 | [diff] [blame] | 67 | |
[email protected] | cba6f81 | 2012-03-27 01:01:50 | [diff] [blame] | 68 | // Called after we've finished connecting all channels. |
| 69 | virtual void OnSessionChannelsConnected(ClientSession* client) = 0; |
| 70 | |
[email protected] | 1f249e2 | 2011-11-29 20:19:59 | [diff] [blame] | 71 | // Called after authentication has failed. Must not tear down this |
| 72 | // object. OnSessionClosed() is notified after this handler |
| 73 | // returns. |
| 74 | virtual void OnSessionAuthenticationFailed(ClientSession* client) = 0; |
| 75 | |
| 76 | // Called after connection has failed or after the client closed it. |
[email protected] | ee910fd | 2011-11-10 18:23:31 | [diff] [blame] | 77 | virtual void OnSessionClosed(ClientSession* client) = 0; |
[email protected] | 1f249e2 | 2011-11-29 20:19:59 | [diff] [blame] | 78 | |
[email protected] | 91e4b7f6 | 2012-01-25 23:23:02 | [diff] [blame] | 79 | // Called on notification of a route change event, when a channel is |
| 80 | // connected. |
[email protected] | 17af2ab | 2012-02-02 04:07:52 | [diff] [blame] | 81 | virtual void OnSessionRouteChange( |
| 82 | ClientSession* client, |
| 83 | const std::string& channel_name, |
[email protected] | be451c8 | 2012-03-20 22:24:47 | [diff] [blame] | 84 | const protocol::TransportRoute& route) = 0; |
[email protected] | 512d03f | 2012-06-26 01:06:06 | [diff] [blame] | 85 | |
| 86 | protected: |
| 87 | virtual ~EventHandler() {} |
[email protected] | 44f6076 | 2011-03-23 12:13:35 | [diff] [blame] | 88 | }; |
| 89 | |
[email protected] | 233bb94 | 2013-03-15 07:18:17 | [diff] [blame] | 90 | // |event_handler| and |desktop_environment_factory| must outlive |this|. |
[email protected] | 1b478ba | 2014-07-31 12:51:43 | [diff] [blame] | 91 | // All |HostExtension|s in |extensions| must outlive |this|. |
sergeyu | 85df3c48 | 2016-02-15 05:59:08 | [diff] [blame] | 92 | ClientSession(EventHandler* event_handler, |
dcheng | 0765c49 | 2016-04-06 22:41:53 | [diff] [blame] | 93 | std::unique_ptr<protocol::ConnectionToClient> connection, |
sergeyu | 85df3c48 | 2016-02-15 05:59:08 | [diff] [blame] | 94 | DesktopEnvironmentFactory* desktop_environment_factory, |
zijiehe | 4aa6ea4 | 2016-11-12 01:28:16 | [diff] [blame] | 95 | const DesktopEnvironmentOptions& desktop_environment_options, |
sergeyu | 85df3c48 | 2016-02-15 05:59:08 | [diff] [blame] | 96 | const base::TimeDelta& max_duration, |
| 97 | scoped_refptr<protocol::PairingRegistry> pairing_registry, |
| 98 | const std::vector<HostExtension*>& extensions); |
dcheng | 562aba5 | 2014-10-21 12:30:14 | [diff] [blame] | 99 | ~ClientSession() override; |
[email protected] | 44f6076 | 2011-03-23 12:13:35 | [diff] [blame] | 100 | |
[email protected] | 1b478ba | 2014-07-31 12:51:43 | [diff] [blame] | 101 | // Returns the set of capabilities negotiated between client and host. |
| 102 | const std::string& capabilities() const { return capabilities_; } |
[email protected] | 399b4f6 | 2014-05-30 20:13:15 | [diff] [blame] | 103 | |
[email protected] | f2b9cf3 | 2012-04-27 00:13:43 | [diff] [blame] | 104 | // protocol::HostStub interface. |
dcheng | 562aba5 | 2014-10-21 12:30:14 | [diff] [blame] | 105 | void NotifyClientResolution( |
mostynb | 11d989c | 2014-10-08 16:58:09 | [diff] [blame] | 106 | const protocol::ClientResolution& resolution) override; |
dcheng | 562aba5 | 2014-10-21 12:30:14 | [diff] [blame] | 107 | void ControlVideo(const protocol::VideoControl& video_control) override; |
| 108 | void ControlAudio(const protocol::AudioControl& audio_control) override; |
| 109 | void SetCapabilities(const protocol::Capabilities& capabilities) override; |
| 110 | void RequestPairing( |
mostynb | 11d989c | 2014-10-08 16:58:09 | [diff] [blame] | 111 | const remoting::protocol::PairingRequest& pairing_request) override; |
dcheng | 562aba5 | 2014-10-21 12:30:14 | [diff] [blame] | 112 | void DeliverClientMessage(const protocol::ExtensionMessage& message) override; |
[email protected] | f2b9cf3 | 2012-04-27 00:13:43 | [diff] [blame] | 113 | |
[email protected] | ee910fd | 2011-11-10 18:23:31 | [diff] [blame] | 114 | // protocol::ConnectionToClient::EventHandler interface. |
sergeyu | 4e1f4cd | 2016-09-27 00:42:52 | [diff] [blame] | 115 | void OnConnectionAuthenticating() override; |
| 116 | void OnConnectionAuthenticated() override; |
| 117 | void CreateMediaStreams() override; |
| 118 | void OnConnectionChannelsConnected() override; |
| 119 | void OnConnectionClosed(protocol::ErrorCode error) override; |
sergeyu | 4e1f4cd | 2016-09-27 00:42:52 | [diff] [blame] | 120 | void OnRouteChange(const std::string& channel_name, |
dcheng | 562aba5 | 2014-10-21 12:30:14 | [diff] [blame] | 121 | const protocol::TransportRoute& route) override; |
[email protected] | 44f6076 | 2011-03-23 12:13:35 | [diff] [blame] | 122 | |
[email protected] | 231316a | 2013-03-25 06:01:12 | [diff] [blame] | 123 | // ClientSessionControl interface. |
dcheng | 562aba5 | 2014-10-21 12:30:14 | [diff] [blame] | 124 | const std::string& client_jid() const override; |
sergeyu | ec77d854 | 2015-11-03 22:31:00 | [diff] [blame] | 125 | void DisconnectSession(protocol::ErrorCode error) override; |
dcheng | 562aba5 | 2014-10-21 12:30:14 | [diff] [blame] | 126 | void OnLocalMouseMoved(const webrtc::DesktopVector& position) override; |
| 127 | void SetDisableInputs(bool disable_inputs) override; |
[email protected] | 1ce457a | 2011-05-19 19:59:48 | [diff] [blame] | 128 | |
joedow | 4fa09d9 | 2016-06-27 21:26:17 | [diff] [blame] | 129 | // ClientSessionDetails interface. |
| 130 | uint32_t desktop_session_id() const override; |
| 131 | ClientSessionControl* session_control() override; |
| 132 | |
sergeyu | 6ad12dc | 2016-04-02 00:01:32 | [diff] [blame] | 133 | protocol::ConnectionToClient* connection() const { return connection_.get(); } |
[email protected] | 44f6076 | 2011-03-23 12:13:35 | [diff] [blame] | 134 | |
sergeyu | 6ad12dc | 2016-04-02 00:01:32 | [diff] [blame] | 135 | bool is_authenticated() { return is_authenticated_; } |
[email protected] | dda4da3b | 2012-05-22 00:51:26 | [diff] [blame] | 136 | |
[email protected] | 399b4f6 | 2014-05-30 20:13:15 | [diff] [blame] | 137 | const std::string* client_capabilities() const { |
| 138 | return client_capabilities_.get(); |
| 139 | } |
| 140 | |
sergeyu | b047307a | 2016-10-18 17:19:29 | [diff] [blame] | 141 | void SetEventTimestampsSourceForTests( |
| 142 | scoped_refptr<protocol::InputEventTimestampsSource> |
| 143 | event_timestamp_source); |
| 144 | |
[email protected] | 170cba4 | 2012-09-12 22:28:39 | [diff] [blame] | 145 | private: |
[email protected] | 7f44ba4 | 2012-05-31 20:26:29 | [diff] [blame] | 146 | // Creates a proxy for sending clipboard events to the client. |
dcheng | 0765c49 | 2016-04-06 22:41:53 | [diff] [blame] | 147 | std::unique_ptr<protocol::ClipboardStub> CreateClipboardProxy(); |
[email protected] | 7f44ba4 | 2012-05-31 20:26:29 | [diff] [blame] | 148 | |
sergeyu | ad51be8 | 2016-06-22 06:04:39 | [diff] [blame] | 149 | // protocol::VideoStream::Observer implementation. |
| 150 | void OnVideoSizeChanged(protocol::VideoStream* stream, |
| 151 | const webrtc::DesktopSize& size, |
| 152 | const webrtc::DesktopVector& dpi) override; |
sergeyu | a609b7a | 2015-11-30 06:25:39 | [diff] [blame] | 153 | |
[email protected] | 44f6076 | 2011-03-23 12:13:35 | [diff] [blame] | 154 | EventHandler* event_handler_; |
[email protected] | 4ea2c7c | 2011-03-31 14:20:06 | [diff] [blame] | 155 | |
[email protected] | 4ea2c7c | 2011-03-31 14:20:06 | [diff] [blame] | 156 | // The connection to the client. |
dcheng | 0765c49 | 2016-04-06 22:41:53 | [diff] [blame] | 157 | std::unique_ptr<protocol::ConnectionToClient> connection_; |
[email protected] | 44f6076 | 2011-03-23 12:13:35 | [diff] [blame] | 158 | |
[email protected] | ce404ca | 2013-01-16 17:23:53 | [diff] [blame] | 159 | std::string client_jid_; |
| 160 | |
[email protected] | 233bb94 | 2013-03-15 07:18:17 | [diff] [blame] | 161 | // Used to create a DesktopEnvironment instance for this session. |
| 162 | DesktopEnvironmentFactory* desktop_environment_factory_; |
[email protected] | 170cba4 | 2012-09-12 22:28:39 | [diff] [blame] | 163 | |
zijiehe | 4aa6ea4 | 2016-11-12 01:28:16 | [diff] [blame] | 164 | // The DesktopEnvironmentOptions used to initialize DesktopEnvironment. |
| 165 | DesktopEnvironmentOptions desktop_environment_options_; |
| 166 | |
[email protected] | 231316a | 2013-03-25 06:01:12 | [diff] [blame] | 167 | // The DesktopEnvironment instance for this session. |
dcheng | 0765c49 | 2016-04-06 22:41:53 | [diff] [blame] | 168 | std::unique_ptr<DesktopEnvironment> desktop_environment_; |
[email protected] | 231316a | 2013-03-25 06:01:12 | [diff] [blame] | 169 | |
[email protected] | eccc2d4 | 2013-01-10 19:35:14 | [diff] [blame] | 170 | // Filter used as the final element in the input pipeline. |
| 171 | protocol::InputFilter host_input_filter_; |
[email protected] | 4ea2c7c | 2011-03-31 14:20:06 | [diff] [blame] | 172 | |
[email protected] | 86cbe6b | 2012-04-03 00:56:18 | [diff] [blame] | 173 | // Tracker used to release pressed keys and buttons when disconnecting. |
| 174 | protocol::InputEventTracker input_tracker_; |
| 175 | |
| 176 | // Filter used to disable remote inputs during local input activity. |
| 177 | RemoteInputFilter remote_input_filter_; |
| 178 | |
[email protected] | f5d62e36 | 2012-04-30 20:54:37 | [diff] [blame] | 179 | // Filter used to clamp mouse events to the current display dimensions. |
sergeyu | a609b7a | 2015-11-30 06:25:39 | [diff] [blame] | 180 | protocol::MouseInputFilter mouse_clamping_filter_; |
[email protected] | f5d62e36 | 2012-04-30 20:54:37 | [diff] [blame] | 181 | |
[email protected] | 750ae6b | 2012-08-20 22:52:40 | [diff] [blame] | 182 | // Filter to used to stop clipboard items sent from the client being echoed |
[email protected] | eccc2d4 | 2013-01-10 19:35:14 | [diff] [blame] | 183 | // back to it. It is the final element in the clipboard (client -> host) |
| 184 | // pipeline. |
[email protected] | 750ae6b | 2012-08-20 22:52:40 | [diff] [blame] | 185 | protocol::ClipboardEchoFilter clipboard_echo_filter_; |
| 186 | |
[email protected] | 34df2ab | 2012-08-19 06:54:23 | [diff] [blame] | 187 | // Filters used to manage enabling & disabling of input & clipboard. |
[email protected] | 86cbe6b | 2012-04-03 00:56:18 | [diff] [blame] | 188 | protocol::InputFilter disable_input_filter_; |
[email protected] | 34df2ab | 2012-08-19 06:54:23 | [diff] [blame] | 189 | protocol::ClipboardFilter disable_clipboard_filter_; |
[email protected] | 86cbe6b | 2012-04-03 00:56:18 | [diff] [blame] | 190 | |
[email protected] | 7f44ba4 | 2012-05-31 20:26:29 | [diff] [blame] | 191 | // Factory for weak pointers to the client clipboard stub. |
| 192 | // This must appear after |clipboard_echo_filter_|, so that it won't outlive |
| 193 | // it. |
[email protected] | 34df2ab | 2012-08-19 06:54:23 | [diff] [blame] | 194 | base::WeakPtrFactory<protocol::ClipboardStub> client_clipboard_factory_; |
[email protected] | 7f44ba4 | 2012-05-31 20:26:29 | [diff] [blame] | 195 | |
[email protected] | 5dc5b12a | 2012-06-23 01:05:14 | [diff] [blame] | 196 | // The maximum duration of this session. |
| 197 | // There is no maximum if this value is <= 0. |
| 198 | base::TimeDelta max_duration_; |
| 199 | |
| 200 | // A timer that triggers a disconnect when the maximum session duration |
| 201 | // is reached. |
danakj | 8c3eb80 | 2015-09-24 07:53:00 | [diff] [blame] | 202 | base::OneShotTimer max_duration_timer_; |
[email protected] | 5dc5b12a | 2012-06-23 01:05:14 | [diff] [blame] | 203 | |
sergeyu | a609b7a | 2015-11-30 06:25:39 | [diff] [blame] | 204 | // Objects responsible for sending video, audio and mouse shape. |
dcheng | 0765c49 | 2016-04-06 22:41:53 | [diff] [blame] | 205 | std::unique_ptr<protocol::VideoStream> video_stream_; |
sergeyu | cd16e206 | 2016-09-12 19:28:35 | [diff] [blame] | 206 | std::unique_ptr<protocol::AudioStream> audio_stream_; |
dcheng | 0765c49 | 2016-04-06 22:41:53 | [diff] [blame] | 207 | std::unique_ptr<MouseShapePump> mouse_shape_pump_; |
[email protected] | 170cba4 | 2012-09-12 22:28:39 | [diff] [blame] | 208 | |
[email protected] | a5d181f | 2013-04-19 14:55:37 | [diff] [blame] | 209 | // The set of all capabilities supported by the client. |
dcheng | 0765c49 | 2016-04-06 22:41:53 | [diff] [blame] | 210 | std::unique_ptr<std::string> client_capabilities_; |
[email protected] | a5d181f | 2013-04-19 14:55:37 | [diff] [blame] | 211 | |
| 212 | // The set of all capabilities supported by the host. |
| 213 | std::string host_capabilities_; |
| 214 | |
[email protected] | 1b478ba | 2014-07-31 12:51:43 | [diff] [blame] | 215 | // The set of all capabilities negotiated between client and host. |
| 216 | std::string capabilities_; |
| 217 | |
[email protected] | b0b72f11 | 2013-03-24 03:42:42 | [diff] [blame] | 218 | // Used to inject mouse and keyboard input and handle clipboard events. |
dcheng | 0765c49 | 2016-04-06 22:41:53 | [diff] [blame] | 219 | std::unique_ptr<InputInjector> input_injector_; |
[email protected] | 170cba4 | 2012-09-12 22:28:39 | [diff] [blame] | 220 | |
[email protected] | 6f526ce | 2013-03-18 04:38:56 | [diff] [blame] | 221 | // Used to apply client-requested changes in screen resolution. |
dcheng | 0765c49 | 2016-04-06 22:41:53 | [diff] [blame] | 222 | std::unique_ptr<ScreenControls> screen_controls_; |
[email protected] | 61cfdc5 | 2013-03-09 03:04:56 | [diff] [blame] | 223 | |
[email protected] | 8835692 | 2013-06-04 06:26:01 | [diff] [blame] | 224 | // The pairing registry for PIN-less authentication. |
| 225 | scoped_refptr<protocol::PairingRegistry> pairing_registry_; |
| 226 | |
[email protected] | 1b478ba | 2014-07-31 12:51:43 | [diff] [blame] | 227 | // Used to manage extension functionality. |
dcheng | 0765c49 | 2016-04-06 22:41:53 | [diff] [blame] | 228 | std::unique_ptr<HostExtensionSessionManager> extension_manager_; |
[email protected] | 1b478ba | 2014-07-31 12:51:43 | [diff] [blame] | 229 | |
sergeyu | 1f8cd50 | 2015-02-13 21:45:53 | [diff] [blame] | 230 | // Set to true if the client was authenticated successfully. |
sergeyu | 9102cff | 2016-04-07 19:14:01 | [diff] [blame] | 231 | bool is_authenticated_ = false; |
| 232 | |
| 233 | // Set to true after all data channels have been connected. |
| 234 | bool channels_connected_ = false; |
sergeyu | 1f8cd50 | 2015-02-13 21:45:53 | [diff] [blame] | 235 | |
[email protected] | 1b478ba | 2014-07-31 12:51:43 | [diff] [blame] | 236 | // Used to store video channel pause & lossless parameters. |
sergeyu | 9102cff | 2016-04-07 19:14:01 | [diff] [blame] | 237 | bool pause_video_ = false; |
| 238 | bool lossless_video_encode_ = false; |
| 239 | bool lossless_video_color_ = false; |
| 240 | |
| 241 | // VideoLayout is sent only after the control channel is connected. Until |
| 242 | // then it's stored in |pending_video_layout_message_|. |
| 243 | std::unique_ptr<protocol::VideoLayout> pending_video_layout_message_; |
[email protected] | 399b4f6 | 2014-05-30 20:13:15 | [diff] [blame] | 244 | |
sergeyu | b047307a | 2016-10-18 17:19:29 | [diff] [blame] | 245 | scoped_refptr<protocol::InputEventTimestampsSource> |
| 246 | event_timestamp_source_for_tests_; |
| 247 | |
zijiehe | f38c972 | 2017-02-08 02:05:29 | [diff] [blame] | 248 | HostExperimentSessionPlugin host_experiment_session_plugin_; |
| 249 | |
gab | bf77513a | 2017-06-01 14:35:34 | [diff] [blame^] | 250 | SEQUENCE_CHECKER(sequence_checker_); |
| 251 | |
kulkarni.a | 933aeaf | 2014-09-20 13:19:17 | [diff] [blame] | 252 | // Used to disable callbacks to |this| once DisconnectSession() has been |
| 253 | // called. |
| 254 | base::WeakPtrFactory<ClientSessionControl> weak_factory_; |
| 255 | |
[email protected] | 44f6076 | 2011-03-23 12:13:35 | [diff] [blame] | 256 | DISALLOW_COPY_AND_ASSIGN(ClientSession); |
| 257 | }; |
| 258 | |
[email protected] | 44f6076 | 2011-03-23 12:13:35 | [diff] [blame] | 259 | } // namespace remoting |
| 260 | |
| 261 | #endif // REMOTING_HOST_CLIENT_SESSION_H_ |