Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Side by Side Diff: remoting/host/client_session.h

Issue 11781003: Connect to DesktopEnvironment's stubs only when audio/video schedulers are about to be created. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 void Disconnect(); 126 void Disconnect();
127 127
128 // Stops the ClientSession, and calls |stopped_task| on |network_task_runner_| 128 // Stops the ClientSession, and calls |stopped_task| on |network_task_runner_|
129 // when fully stopped. 129 // when fully stopped.
130 void Stop(const base::Closure& stopped_task); 130 void Stop(const base::Closure& stopped_task);
131 131
132 protocol::ConnectionToClient* connection() const { 132 protocol::ConnectionToClient* connection() const {
133 return connection_.get(); 133 return connection_.get();
134 } 134 }
135 135
136 DesktopEnvironment* desktop_environment() const {
137 return desktop_environment_.get();
138 }
139
140 const std::string& client_jid() { return client_jid_; } 136 const std::string& client_jid() { return client_jid_; }
141 137
142 bool is_authenticated() { return auth_input_filter_.enabled(); } 138 bool is_authenticated() { return auth_input_filter_.enabled(); }
143 139
144 // Indicate that local mouse activity has been detected. This causes remote 140 // Indicate that local mouse activity has been detected. This causes remote
145 // inputs to be ignored for a short time so that the local user will always 141 // inputs to be ignored for a short time so that the local user will always
146 // have the upper hand in 'pointer wars'. 142 // have the upper hand in 'pointer wars'.
147 void LocalMouseMoved(const SkIPoint& new_pos); 143 void LocalMouseMoved(const SkIPoint& new_pos);
148 144
149 // Disable handling of input events from this client. If the client has any 145 // Disable handling of input events from this client. If the client has any
(...skipping 24 matching lines...) Expand all
174 scoped_ptr<protocol::ConnectionToClient> connection_; 170 scoped_ptr<protocol::ConnectionToClient> connection_;
175 171
176 // Used to disable callbacks to |connection_| once it is disconnected. 172 // Used to disable callbacks to |connection_| once it is disconnected.
177 base::WeakPtrFactory<protocol::ConnectionToClient> connection_factory_; 173 base::WeakPtrFactory<protocol::ConnectionToClient> connection_factory_;
178 174
179 // The desktop environment used by this session. 175 // The desktop environment used by this session.
180 scoped_ptr<DesktopEnvironment> desktop_environment_; 176 scoped_ptr<DesktopEnvironment> desktop_environment_;
181 177
182 std::string client_jid_; 178 std::string client_jid_;
183 179
184 // The host clipboard and input stubs to which this object delegates. 180 // Tracker used to release pressed keys and buttons when disconnecting. It is
185 // These are the final elements in the clipboard & input pipelines, which 181 // the final element in the input pipeline.
186 // appear in order below.
187 protocol::ClipboardStub* host_clipboard_stub_;
188 protocol::InputStub* host_input_stub_;
189
190 // Tracker used to release pressed keys and buttons when disconnecting.
191 protocol::InputEventTracker input_tracker_; 182 protocol::InputEventTracker input_tracker_;
192 183
193 // Filter used to disable remote inputs during local input activity. 184 // Filter used to disable remote inputs during local input activity.
194 RemoteInputFilter remote_input_filter_; 185 RemoteInputFilter remote_input_filter_;
195 186
196 // Filter used to clamp mouse events to the current display dimensions. 187 // Filter used to clamp mouse events to the current display dimensions.
197 MouseClampingFilter mouse_clamping_filter_; 188 MouseClampingFilter mouse_clamping_filter_;
198 189
199 // Filter to used to stop clipboard items sent from the client being echoed 190 // Filter to used to stop clipboard items sent from the client being echoed
200 // back to it. 191 // back to it. It is the final element in the clipboard (client -> host)
192 // pipeline.
201 protocol::ClipboardEchoFilter clipboard_echo_filter_; 193 protocol::ClipboardEchoFilter clipboard_echo_filter_;
202 194
203 // Filters used to manage enabling & disabling of input & clipboard. 195 // Filters used to manage enabling & disabling of input & clipboard.
204 protocol::InputFilter disable_input_filter_; 196 protocol::InputFilter disable_input_filter_;
205 protocol::ClipboardFilter disable_clipboard_filter_; 197 protocol::ClipboardFilter disable_clipboard_filter_;
206 198
207 // Filters used to disable input & clipboard when we're not authenticated. 199 // Filters used to disable input & clipboard when we're not authenticated.
208 protocol::InputFilter auth_input_filter_; 200 protocol::InputFilter auth_input_filter_;
209 protocol::ClipboardFilter auth_clipboard_filter_; 201 protocol::ClipboardFilter auth_clipboard_filter_;
210 202
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 }; 234 };
243 235
244 // Destroys |ClienSession| instances on the network thread. 236 // Destroys |ClienSession| instances on the network thread.
245 struct ClientSessionTraits { 237 struct ClientSessionTraits {
246 static void Destruct(const ClientSession* client); 238 static void Destruct(const ClientSession* client);
247 }; 239 };
248 240
249 } // namespace remoting 241 } // namespace remoting
250 242
251 #endif // REMOTING_HOST_CLIENT_SESSION_H_ 243 #endif // REMOTING_HOST_CLIENT_SESSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698