diff options
author | alexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-14 14:54:39 +0000 |
---|---|---|
committer | alexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-14 14:54:39 +0000 |
commit | ceffbde06c69531745924a6374b4392f34c22e51 (patch) | |
tree | 45a078d2ac3a4507caebebe1bf719d8fe82fe318 /remoting/host/local_input_monitor.h | |
parent | ce3b13abc2404989ad6f31959a60881f700dd26d (diff) | |
download | chromium_src-ceffbde06c69531745924a6374b4392f34c22e51.zip chromium_src-ceffbde06c69531745924a6374b4392f34c22e51.tar.gz chromium_src-ceffbde06c69531745924a6374b4392f34c22e51.tar.bz2 |
Refactored LocalInputMonitor so that it can be used on any thread while running the backend on the proper UI/input thread.
This will eventually allow to wrap LocalInputMonitor into a SessionController object.
Collateral changes:
- Eliminated the dedicated local input monitor thread on LInux, replacing it with a file descriptor watcher.
- LocalInputMonitor::Create() now receives all task runners it needs.
- Mac version does not use locks anymore, since all UI code is runing on the UI thread.
BUG=104544
Review URL: https://chromiumcodereview.appspot.com/12623020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@188071 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host/local_input_monitor.h')
-rw-r--r-- | remoting/host/local_input_monitor.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/remoting/host/local_input_monitor.h b/remoting/host/local_input_monitor.h index 43513ef..29893d6 100644 --- a/remoting/host/local_input_monitor.h +++ b/remoting/host/local_input_monitor.h @@ -6,8 +6,13 @@ #define REMOTING_HOST_LOCAL_INPUT_MONITOR_H_ #include "base/callback_forward.h" +#include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" +namespace base { +class SingleThreadTaskRunner; +} // namespace base + namespace remoting { class MouseMoveObserver; @@ -26,7 +31,10 @@ class LocalInputMonitor { const base::Closure& disconnect_callback) = 0; virtual void Stop() = 0; - static scoped_ptr<LocalInputMonitor> Create(); + static scoped_ptr<LocalInputMonitor> Create( + scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, + scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, + scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner); }; } // namespace remoting |