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 <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_proxy.h" | |
14 #include "remoting/protocol/clipboard_stub.h" | 15 #include "remoting/protocol/clipboard_stub.h" |
16 #include "remoting/protocol/clipboard_weak_ptr.h" | |
15 #include "remoting/protocol/connection_to_client.h" | 17 #include "remoting/protocol/connection_to_client.h" |
16 #include "remoting/protocol/host_event_stub.h" | 18 #include "remoting/protocol/host_event_stub.h" |
17 #include "remoting/protocol/host_stub.h" | 19 #include "remoting/protocol/host_stub.h" |
18 #include "remoting/protocol/input_event_tracker.h" | 20 #include "remoting/protocol/input_event_tracker.h" |
19 #include "remoting/protocol/input_filter.h" | 21 #include "remoting/protocol/input_filter.h" |
20 #include "remoting/protocol/input_stub.h" | 22 #include "remoting/protocol/input_stub.h" |
21 #include "remoting/protocol/mouse_input_filter.h" | 23 #include "remoting/protocol/mouse_input_filter.h" |
22 #include "third_party/skia/include/core/SkPoint.h" | 24 #include "third_party/skia/include/core/SkPoint.h" |
23 | 25 |
24 namespace remoting { | 26 namespace remoting { |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
114 | 116 |
115 // Indicate that local mouse activity has been detected. This causes remote | 117 // 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 | 118 // inputs to be ignored for a short time so that the local user will always |
117 // have the upper hand in 'pointer wars'. | 119 // have the upper hand in 'pointer wars'. |
118 void LocalMouseMoved(const SkIPoint& new_pos); | 120 void LocalMouseMoved(const SkIPoint& new_pos); |
119 | 121 |
120 // Disable handling of input events from this client. If the client has any | 122 // Disable handling of input events from this client. If the client has any |
121 // keys or mouse buttons pressed then these will be released. | 123 // keys or mouse buttons pressed then these will be released. |
122 void SetDisableInputs(bool disable_inputs); | 124 void SetDisableInputs(bool disable_inputs); |
123 | 125 |
126 // Gets a stub for sending clipboard events to the client. | |
127 scoped_refptr<protocol::ClipboardProxy> ClientClipboard(); | |
Wez
2012/05/30 01:15:43
Since this creates a ClipboardProxy it should have
simonmorris
2012/05/30 16:54:06
Done.
| |
128 | |
124 private: | 129 private: |
125 EventHandler* event_handler_; | 130 EventHandler* event_handler_; |
126 | 131 |
127 // The connection to the client. | 132 // The connection to the client. |
128 scoped_ptr<protocol::ConnectionToClient> connection_; | 133 scoped_ptr<protocol::ConnectionToClient> connection_; |
129 | 134 |
130 std::string client_jid_; | 135 std::string client_jid_; |
131 bool is_authenticated_; | 136 bool is_authenticated_; |
132 | 137 |
133 // The host event stub to which this object delegates. This is the final | 138 // The host event stub to which this object delegates. This is the final |
(...skipping 12 matching lines...) Expand all Loading... | |
146 // Filter used to manage enabling & disabling of client input events. | 151 // Filter used to manage enabling & disabling of client input events. |
147 protocol::InputFilter disable_input_filter_; | 152 protocol::InputFilter disable_input_filter_; |
148 | 153 |
149 // Filter used to disable inputs when we're not authenticated. | 154 // Filter used to disable inputs when we're not authenticated. |
150 protocol::InputFilter auth_input_filter_; | 155 protocol::InputFilter auth_input_filter_; |
151 | 156 |
152 // Filter to used to stop clipboard items sent from the client being echoed | 157 // Filter to used to stop clipboard items sent from the client being echoed |
153 // back to it. | 158 // back to it. |
154 protocol::ClipboardEchoFilter clipboard_echo_filter_; | 159 protocol::ClipboardEchoFilter clipboard_echo_filter_; |
155 | 160 |
161 // Clipboard stub used to provide a weak pointer to the client clipboard. | |
162 protocol::ClipboardWeakPtr client_clipboard_; | |
Wez
2012/05/30 01:15:43
I think you can achieve the same effect without th
simonmorris
2012/05/30 16:54:06
Done.
| |
163 | |
156 // Capturer, used to determine current screen size for ensuring injected | 164 // Capturer, used to determine current screen size for ensuring injected |
157 // mouse events fall within the screen area. | 165 // mouse events fall within the screen area. |
158 // TODO(lambroslambrou): Move floor-control logic, and clamping to screen | 166 // TODO(lambroslambrou): Move floor-control logic, and clamping to screen |
159 // area, out of this class (crbug.com/96508). | 167 // area, out of this class (crbug.com/96508). |
160 Capturer* capturer_; | 168 Capturer* capturer_; |
161 | 169 |
162 DISALLOW_COPY_AND_ASSIGN(ClientSession); | 170 DISALLOW_COPY_AND_ASSIGN(ClientSession); |
163 }; | 171 }; |
164 | 172 |
165 } // namespace remoting | 173 } // namespace remoting |
166 | 174 |
167 #endif // REMOTING_HOST_CLIENT_SESSION_H_ | 175 #endif // REMOTING_HOST_CLIENT_SESSION_H_ |
OLD | NEW |