diff options
author | jamiewalch@chromium.org <jamiewalch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-12 08:54:56 +0000 |
---|---|---|
committer | jamiewalch@chromium.org <jamiewalch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-12 08:54:56 +0000 |
commit | b691a100e6ff4aec4880a6957d6a79921ac53eda (patch) | |
tree | 01dc0d75c38b0bc038397b635cd9f49a02ec063f /remoting/host/local_input_monitor_win.cc | |
parent | 5eb431e2dfe9d55eaff2acc7a3ea64f403dec669 (diff) | |
download | chromium_src-b691a100e6ff4aec4880a6957d6a79921ac53eda.zip chromium_src-b691a100e6ff4aec4880a6957d6a79921ac53eda.tar.gz chromium_src-b691a100e6ff4aec4880a6957d6a79921ac53eda.tar.bz2 |
Implemented floor control for Windows. This also fixes a bug in the event executor that was causing pointer events to be off by 1px.
BUG=96649
TEST=Manual
Review URL: http://codereview.chromium.org/8114023
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105043 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host/local_input_monitor_win.cc')
-rw-r--r-- | remoting/host/local_input_monitor_win.cc | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/remoting/host/local_input_monitor_win.cc b/remoting/host/local_input_monitor_win.cc index 6d06bc09..d728a50 100644 --- a/remoting/host/local_input_monitor_win.cc +++ b/remoting/host/local_input_monitor_win.cc @@ -6,27 +6,46 @@ #include "base/compiler_specific.h" #include "base/logging.h" +#include "remoting/host/chromoting_host.h" +#include "remoting/host/local_input_monitor_thread_win.h" namespace { class LocalInputMonitorWin : public remoting::LocalInputMonitor { public: - LocalInputMonitorWin() {} + LocalInputMonitorWin(); + ~LocalInputMonitorWin(); + virtual void Start(remoting::ChromotingHost* host) OVERRIDE; virtual void Stop() OVERRIDE; private: DISALLOW_COPY_AND_ASSIGN(LocalInputMonitorWin); + + remoting::ChromotingHost* chromoting_host_; }; } // namespace + +LocalInputMonitorWin::LocalInputMonitorWin() : chromoting_host_(NULL) { +} + +LocalInputMonitorWin::~LocalInputMonitorWin() { + DCHECK(chromoting_host_ == NULL); +} + void LocalInputMonitorWin::Start(remoting::ChromotingHost* host) { - NOTIMPLEMENTED(); + DCHECK(chromoting_host_ == NULL); + chromoting_host_ = host; + remoting::LocalInputMonitorThread::AddHostToInputMonitor(chromoting_host_); } void LocalInputMonitorWin::Stop() { - NOTIMPLEMENTED(); + DCHECK(chromoting_host_ != NULL); + remoting::LocalInputMonitorThread::RemoveHostFromInputMonitor( + chromoting_host_); + chromoting_host_ = NULL; } remoting::LocalInputMonitor* remoting::LocalInputMonitor::Create() { |