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

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

Issue 10413060: [Chromoting] Let the Windows IT2Me host send clipboard events to the client. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Don't ref-count ClipboardThreadProxy. Created 8 years, 6 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/time.h" 10 #include "base/time.h"
11 #include "base/threading/non_thread_safe.h" 11 #include "base/threading/non_thread_safe.h"
12 #include "remoting/host/remote_input_filter.h" 12 #include "remoting/host/remote_input_filter.h"
13 #include "remoting/protocol/clipboard_echo_filter.h" 13 #include "remoting/protocol/clipboard_echo_filter.h"
14 #include "remoting/protocol/clipboard_thread_proxy.h"
14 #include "remoting/protocol/clipboard_stub.h" 15 #include "remoting/protocol/clipboard_stub.h"
15 #include "remoting/protocol/connection_to_client.h" 16 #include "remoting/protocol/connection_to_client.h"
16 #include "remoting/protocol/host_event_stub.h" 17 #include "remoting/protocol/host_event_stub.h"
17 #include "remoting/protocol/host_stub.h" 18 #include "remoting/protocol/host_stub.h"
18 #include "remoting/protocol/input_event_tracker.h" 19 #include "remoting/protocol/input_event_tracker.h"
19 #include "remoting/protocol/input_filter.h" 20 #include "remoting/protocol/input_filter.h"
20 #include "remoting/protocol/input_stub.h" 21 #include "remoting/protocol/input_stub.h"
21 #include "remoting/protocol/mouse_input_filter.h" 22 #include "remoting/protocol/mouse_input_filter.h"
22 #include "third_party/skia/include/core/SkPoint.h" 23 #include "third_party/skia/include/core/SkPoint.h"
23 24
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 115
115 // Indicate that local mouse activity has been detected. This causes remote 116 // Indicate that local mouse activity has been detected. This causes remote
116 // inputs to be ignored for a short time so that the local user will always 117 // inputs to be ignored for a short time so that the local user will always
117 // have the upper hand in 'pointer wars'. 118 // have the upper hand in 'pointer wars'.
118 void LocalMouseMoved(const SkIPoint& new_pos); 119 void LocalMouseMoved(const SkIPoint& new_pos);
119 120
120 // Disable handling of input events from this client. If the client has any 121 // Disable handling of input events from this client. If the client has any
121 // keys or mouse buttons pressed then these will be released. 122 // keys or mouse buttons pressed then these will be released.
122 void SetDisableInputs(bool disable_inputs); 123 void SetDisableInputs(bool disable_inputs);
123 124
125 // Creates a proxy for sending clipboard events to the client.
126 scoped_ptr<protocol::ClipboardThreadProxy> CreateClipboardProxy();
127
124 private: 128 private:
125 EventHandler* event_handler_; 129 EventHandler* event_handler_;
126 130
127 // The connection to the client. 131 // The connection to the client.
128 scoped_ptr<protocol::ConnectionToClient> connection_; 132 scoped_ptr<protocol::ConnectionToClient> connection_;
129 133
130 std::string client_jid_; 134 std::string client_jid_;
131 bool is_authenticated_; 135 bool is_authenticated_;
132 136
133 // The host event stub to which this object delegates. This is the final 137 // The host event stub to which this object delegates. This is the final
(...skipping 12 matching lines...) Expand all
146 // Filter used to manage enabling & disabling of client input events. 150 // Filter used to manage enabling & disabling of client input events.
147 protocol::InputFilter disable_input_filter_; 151 protocol::InputFilter disable_input_filter_;
148 152
149 // Filter used to disable inputs when we're not authenticated. 153 // Filter used to disable inputs when we're not authenticated.
150 protocol::InputFilter auth_input_filter_; 154 protocol::InputFilter auth_input_filter_;
151 155
152 // Filter to used to stop clipboard items sent from the client being echoed 156 // Filter to used to stop clipboard items sent from the client being echoed
153 // back to it. 157 // back to it.
154 protocol::ClipboardEchoFilter clipboard_echo_filter_; 158 protocol::ClipboardEchoFilter clipboard_echo_filter_;
155 159
160 // Factory for weak pointers to the client clipboard.
Wez 2012/05/30 23:58:02 nit: ... to the client clipboard stub.
simonmorris 2012/05/31 00:21:18 Done.
161 base::WeakPtrFactory<ClipboardStub> client_clipboard_factory_;
Wez 2012/05/30 23:58:02 nit: Consider clarifying that this _must_ appear a
simonmorris 2012/05/31 00:21:18 Done.
162
156 // Capturer, used to determine current screen size for ensuring injected 163 // Capturer, used to determine current screen size for ensuring injected
157 // mouse events fall within the screen area. 164 // mouse events fall within the screen area.
158 // TODO(lambroslambrou): Move floor-control logic, and clamping to screen 165 // TODO(lambroslambrou): Move floor-control logic, and clamping to screen
159 // area, out of this class (crbug.com/96508). 166 // area, out of this class (crbug.com/96508).
160 Capturer* capturer_; 167 Capturer* capturer_;
161 168
162 DISALLOW_COPY_AND_ASSIGN(ClientSession); 169 DISALLOW_COPY_AND_ASSIGN(ClientSession);
163 }; 170 };
164 171
165 } // namespace remoting 172 } // namespace remoting
166 173
167 #endif // REMOTING_HOST_CLIENT_SESSION_H_ 174 #endif // REMOTING_HOST_CLIENT_SESSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698