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_stub.h" | 13 #include "remoting/protocol/clipboard_stub.h" |
14 #include "remoting/protocol/connection_to_client.h" | 14 #include "remoting/protocol/connection_to_client.h" |
15 #include "remoting/protocol/host_event_stub.h" | 15 #include "remoting/protocol/host_event_stub.h" |
16 #include "remoting/protocol/host_stub.h" | 16 #include "remoting/protocol/host_stub.h" |
17 #include "remoting/protocol/input_event_tracker.h" | 17 #include "remoting/protocol/input_event_tracker.h" |
18 #include "remoting/protocol/input_filter.h" | 18 #include "remoting/protocol/input_filter.h" |
19 #include "remoting/protocol/input_stub.h" | 19 #include "remoting/protocol/input_stub.h" |
| 20 #include "remoting/protocol/mouse_input_filter.h" |
20 #include "third_party/skia/include/core/SkPoint.h" | 21 #include "third_party/skia/include/core/SkPoint.h" |
21 | 22 |
22 namespace remoting { | 23 namespace remoting { |
23 | 24 |
24 class Capturer; | 25 class Capturer; |
25 | 26 |
26 // A ClientSession keeps a reference to a connection to a client, and maintains | 27 // A ClientSession keeps a reference to a connection to a client, and maintains |
27 // per-client state. | 28 // per-client state. |
28 class ClientSession : public protocol::HostEventStub, | 29 class ClientSession : public protocol::HostEventStub, |
29 public protocol::HostStub, | 30 public protocol::HostStub, |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 void SetDisableInputs(bool disable_inputs); | 117 void SetDisableInputs(bool disable_inputs); |
117 | 118 |
118 private: | 119 private: |
119 EventHandler* event_handler_; | 120 EventHandler* event_handler_; |
120 | 121 |
121 // The connection to the client. | 122 // The connection to the client. |
122 scoped_ptr<protocol::ConnectionToClient> connection_; | 123 scoped_ptr<protocol::ConnectionToClient> connection_; |
123 | 124 |
124 std::string client_jid_; | 125 std::string client_jid_; |
125 | 126 |
126 // The host event stub to which this object delegates. | 127 // The host event stub to which this object delegates. This is the final |
| 128 // element in the input pipeline, whose components appear in order below. |
127 protocol::HostEventStub* host_event_stub_; | 129 protocol::HostEventStub* host_event_stub_; |
128 | 130 |
129 // Tracker used to release pressed keys and buttons when disconnecting. | 131 // Tracker used to release pressed keys and buttons when disconnecting. |
130 protocol::InputEventTracker input_tracker_; | 132 protocol::InputEventTracker input_tracker_; |
131 | 133 |
132 // Filter used to disable remote inputs during local input activity. | 134 // Filter used to disable remote inputs during local input activity. |
133 RemoteInputFilter remote_input_filter_; | 135 RemoteInputFilter remote_input_filter_; |
134 | 136 |
| 137 // Filter used to clamp mouse events to the current display dimensions. |
| 138 protocol::MouseInputFilter mouse_input_filter_; |
| 139 |
135 // Filter used to manage enabling & disabling of client input events. | 140 // Filter used to manage enabling & disabling of client input events. |
136 protocol::InputFilter disable_input_filter_; | 141 protocol::InputFilter disable_input_filter_; |
137 | 142 |
138 // Filter used to disable inputs when we're not authenticated. | 143 // Filter used to disable inputs when we're not authenticated. |
139 protocol::InputFilter auth_input_filter_; | 144 protocol::InputFilter auth_input_filter_; |
140 | 145 |
141 // Capturer, used to determine current screen size for ensuring injected | 146 // Capturer, used to determine current screen size for ensuring injected |
142 // mouse events fall within the screen area. | 147 // mouse events fall within the screen area. |
143 // TODO(lambroslambrou): Move floor-control logic, and clamping to screen | 148 // TODO(lambroslambrou): Move floor-control logic, and clamping to screen |
144 // area, out of this class (crbug.com/96508). | 149 // area, out of this class (crbug.com/96508). |
145 Capturer* capturer_; | 150 Capturer* capturer_; |
146 | 151 |
147 DISALLOW_COPY_AND_ASSIGN(ClientSession); | 152 DISALLOW_COPY_AND_ASSIGN(ClientSession); |
148 }; | 153 }; |
149 | 154 |
150 } // namespace remoting | 155 } // namespace remoting |
151 | 156 |
152 #endif // REMOTING_HOST_CLIENT_SESSION_H_ | 157 #endif // REMOTING_HOST_CLIENT_SESSION_H_ |
OLD | NEW |