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

Unified Diff: remoting/host/client_session.cc

Issue 10829409: Add MouseClampingFilter and update ClientSession to use it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/host/client_session.h ('k') | remoting/host/mouse_clamping_filter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/client_session.cc
diff --git a/remoting/host/client_session.cc b/remoting/host/client_session.cc
index 578fe7569a8f71f550992574758a5759de48a204..445900010f99031bf8d3f0b2d0ace98cd10ae68b 100644
--- a/remoting/host/client_session.cc
+++ b/remoting/host/client_session.cc
@@ -29,8 +29,8 @@ ClientSession::ClientSession(
host_input_stub_(host_input_stub),
input_tracker_(host_input_stub_),
remote_input_filter_(&input_tracker_),
- mouse_input_filter_(&remote_input_filter_),
- disable_input_filter_(&mouse_input_filter_),
+ mouse_clamping_filter_(capturer, &remote_input_filter_),
+ disable_input_filter_(&mouse_clamping_filter_),
disable_clipboard_filter_(clipboard_echo_filter_.host_filter()),
auth_input_filter_(&disable_input_filter_),
auth_clipboard_filter_(&disable_clipboard_filter_),
@@ -44,7 +44,7 @@ ClientSession::ClientSession(
// later and set them only when connection is authenticated.
connection_->set_clipboard_stub(&auth_clipboard_filter_);
connection_->set_host_stub(this);
- connection_->set_input_stub(this);
+ connection_->set_input_stub(&auth_input_filter_);
clipboard_echo_filter_.set_host_stub(host_clipboard_stub_);
// |auth_*_filter_|'s states reflect whether the session is authenticated.
@@ -55,21 +55,6 @@ ClientSession::ClientSession(
ClientSession::~ClientSession() {
}
-void ClientSession::InjectKeyEvent(const protocol::KeyEvent& event) {
- DCHECK(CalledOnValidThread());
- auth_input_filter_.InjectKeyEvent(event);
-}
-
-void ClientSession::InjectMouseEvent(const protocol::MouseEvent& event) {
- DCHECK(CalledOnValidThread());
-
- // Ensure that the MouseInputFilter is clamping to the current dimensions.
- mouse_input_filter_.set_output_size(capturer_->size_most_recent());
- mouse_input_filter_.set_input_size(capturer_->size_most_recent());
-
- auth_input_filter_.InjectMouseEvent(event);
-}
-
void ClientSession::NotifyClientDimensions(
const protocol::ClientDimensions& dimensions) {
// TODO(wez): Use the dimensions, e.g. to resize the host desktop to match.
« no previous file with comments | « remoting/host/client_session.h ('k') | remoting/host/mouse_clamping_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698