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

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

Issue 10860033: Allow input & clipboard filters to be disabled without NULLing target stub. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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
« no previous file with comments | « no previous file | remoting/host/client_session.cc » ('j') | remoting/host/client_session.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/time.h" 10 #include "base/time.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 // be called multiple times. The object should not be used after 107 // be called multiple times. The object should not be used after
108 // this method returns. 108 // this method returns.
109 void Disconnect(); 109 void Disconnect();
110 110
111 protocol::ConnectionToClient* connection() const { 111 protocol::ConnectionToClient* connection() const {
112 return connection_.get(); 112 return connection_.get();
113 } 113 }
114 114
115 const std::string& client_jid() { return client_jid_; } 115 const std::string& client_jid() { return client_jid_; }
116 116
117 bool is_authenticated() { return is_authenticated_; } 117 bool is_authenticated() { return auth_input_filter_.enabled(); }
118 118
119 // Indicate that local mouse activity has been detected. This causes remote 119 // Indicate that local mouse activity has been detected. This causes remote
120 // inputs to be ignored for a short time so that the local user will always 120 // inputs to be ignored for a short time so that the local user will always
121 // have the upper hand in 'pointer wars'. 121 // have the upper hand in 'pointer wars'.
122 void LocalMouseMoved(const SkIPoint& new_pos); 122 void LocalMouseMoved(const SkIPoint& new_pos);
123 123
124 // Disable handling of input events from this client. If the client has any 124 // Disable handling of input events from this client. If the client has any
125 // keys or mouse buttons pressed then these will be released. 125 // keys or mouse buttons pressed then these will be released.
126 void SetDisableInputs(bool disable_inputs); 126 void SetDisableInputs(bool disable_inputs);
127 127
128 // Creates a proxy for sending clipboard events to the client. 128 // Creates a proxy for sending clipboard events to the client.
129 scoped_ptr<protocol::ClipboardStub> CreateClipboardProxy(); 129 scoped_ptr<protocol::ClipboardStub> CreateClipboardProxy();
130 130
131 private: 131 private:
132 EventHandler* event_handler_; 132 EventHandler* event_handler_;
133 133
134 // The connection to the client. 134 // The connection to the client.
135 scoped_ptr<protocol::ConnectionToClient> connection_; 135 scoped_ptr<protocol::ConnectionToClient> connection_;
136 136
137 std::string client_jid_; 137 std::string client_jid_;
138 bool is_authenticated_;
139 138
140 // The host clipboard and input stubs to which this object delegates. 139 // The host clipboard and input stubs to which this object delegates.
141 // These are the final elements in the clipboard & input pipelines, which 140 // These are the final elements in the clipboard & input pipelines, which
142 // appear in order below. 141 // appear in order below.
143 protocol::ClipboardStub* host_clipboard_stub_; 142 protocol::ClipboardStub* host_clipboard_stub_;
144 protocol::InputStub* host_input_stub_; 143 protocol::InputStub* host_input_stub_;
145 144
146 // Tracker used to release pressed keys and buttons when disconnecting. 145 // Tracker used to release pressed keys and buttons when disconnecting.
147 protocol::InputEventTracker input_tracker_; 146 protocol::InputEventTracker input_tracker_;
148 147
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 // A timer that triggers a disconnect when the maximum session duration 179 // A timer that triggers a disconnect when the maximum session duration
181 // is reached. 180 // is reached.
182 base::OneShotTimer<ClientSession> max_duration_timer_; 181 base::OneShotTimer<ClientSession> max_duration_timer_;
183 182
184 DISALLOW_COPY_AND_ASSIGN(ClientSession); 183 DISALLOW_COPY_AND_ASSIGN(ClientSession);
185 }; 184 };
186 185
187 } // namespace remoting 186 } // namespace remoting
188 187
189 #endif // REMOTING_HOST_CLIENT_SESSION_H_ 188 #endif // REMOTING_HOST_CLIENT_SESSION_H_
OLDNEW
« no previous file with comments | « no previous file | remoting/host/client_session.cc » ('j') | remoting/host/client_session.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698