diff options
author | jamiewalch@google.com <jamiewalch@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-13 20:08:22 +0000 |
---|---|---|
committer | jamiewalch@google.com <jamiewalch@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-13 20:08:22 +0000 |
commit | faa876c586096d73af30506e14b39cf24e78f05f (patch) | |
tree | 15fc86058226c7589c6a767a2104a3f26ad0195c /remoting/host/client_session.h | |
parent | 6bfae22b20d5750a722bfe87332a17c53641104c (diff) | |
download | chromium_src-faa876c586096d73af30506e14b39cf24e78f05f.zip chromium_src-faa876c586096d73af30506e14b39cf24e78f05f.tar.gz chromium_src-faa876c586096d73af30506e14b39cf24e78f05f.tar.bz2 |
Block remote mouse inputs for a short time when local input is received.
BUG=
TEST=
Review URL: http://codereview.chromium.org/7134048
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88878 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host/client_session.h')
-rw-r--r-- | remoting/host/client_session.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/remoting/host/client_session.h b/remoting/host/client_session.h index ac124a8..e014bdc 100644 --- a/remoting/host/client_session.h +++ b/remoting/host/client_session.h @@ -5,9 +5,12 @@ #ifndef REMOTING_HOST_CLIENT_SESSION_H_ #define REMOTING_HOST_CLIENT_SESSION_H_ +#include <list> + #include "remoting/protocol/connection_to_client.h" #include "remoting/protocol/host_stub.h" #include "remoting/protocol/input_stub.h" +#include "ui/gfx/point.h" namespace remoting { @@ -65,6 +68,13 @@ class ClientSession : public protocol::HostStub, return authenticated_; } + // Indicate that local mouse activity has been detected. This causes remote + // inputs to be ignored for a short time so that the local user will always + // have the upper hand in 'pointer wars'. + void LocalMouseMoved(const gfx::Point& new_pos); + + bool ShouldIgnoreRemoteInput() const; + private: friend class base::RefCountedThreadSafe<ClientSession>; virtual ~ClientSession(); @@ -83,6 +93,11 @@ class ClientSession : public protocol::HostStub, // Whether this client is authenticated. bool authenticated_; + // State to control remote input blocking while the local pointer is in use. + uint32 remote_mouse_button_state_; + std::list<gfx::Point> recent_remote_mouse_positions_; + base::Time latest_local_input_time_; + DISALLOW_COPY_AND_ASSIGN(ClientSession); }; |