diff options
author | kelvinp <kelvinp@chromium.org> | 2014-11-13 13:42:20 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-11-13 21:42:41 +0000 |
commit | 95f5484078fada16ca43bf958dd1508fb7e2b832 (patch) | |
tree | 0e344ccf61b48299b39ab0d9cdfb6fce0458da30 /remoting/host/input_injector_chromeos.h | |
parent | 941beb936fc6f44514217d6896460fa0d8a067ef (diff) | |
download | chromium_src-95f5484078fada16ca43bf958dd1508fb7e2b832.zip chromium_src-95f5484078fada16ca43bf958dd1508fb7e2b832.tar.gz chromium_src-95f5484078fada16ca43bf958dd1508fb7e2b832.tar.bz2 |
Remote assistance on Chrome OS Part VIII - Compile on Ozone
This CL makes It2Me host compile on platforms that uses Ozone.
It replaces the X11-based LocalInputMonitor, MouseCursorMonitor and InputInjector
with placeholder implementations for Chrome OS.
An actual implementation is provided for the LocalInputMonitor with code ported from
https://codereview.chromium.org/652293003/.
BUG=431876
Committed: https://crrev.com/18ffa032d49f63f8ae00e68ea7a870e61527bea5
Cr-Commit-Position: refs/heads/master@{#303971}
Review URL: https://codereview.chromium.org/700333007
Cr-Commit-Position: refs/heads/master@{#304091}
Diffstat (limited to 'remoting/host/input_injector_chromeos.h')
-rw-r--r-- | remoting/host/input_injector_chromeos.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/remoting/host/input_injector_chromeos.h b/remoting/host/input_injector_chromeos.h new file mode 100644 index 0000000..7670591 --- /dev/null +++ b/remoting/host/input_injector_chromeos.h @@ -0,0 +1,42 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef REMOTING_HOST_INPUT_INJECTOR_CHROMEOS_H_ +#define REMOTING_HOST_INPUT_INJECTOR_CHROMEOS_H_ + +#include "base/single_thread_task_runner.h" +#include "remoting/host/input_injector.h" + +namespace remoting { + +// InputInjector implementation that translates input to ui::Events and passes +// them to a supplied delegate for injection into ChromeOS. +class InputInjectorChromeos : public InputInjector { + public: + explicit InputInjectorChromeos( + scoped_refptr<base::SingleThreadTaskRunner> task_runner); + + ~InputInjectorChromeos() override; + + // Clipboard stub interface. + void InjectClipboardEvent(const protocol::ClipboardEvent& event) override; + + // InputStub interface. + void InjectKeyEvent(const protocol::KeyEvent& event) override; + void InjectTextEvent(const protocol::TextEvent& event) override; + void InjectMouseEvent(const protocol::MouseEvent& event) override; + + // InputInjector interface. + void Start(scoped_ptr<protocol::ClipboardStub> client_clipboard) override; + + private: + // Task runner for input injection. + scoped_refptr<base::SingleThreadTaskRunner> input_task_runner_; + + DISALLOW_COPY_AND_ASSIGN(InputInjectorChromeos); +}; + +} // namespace remoting + +#endif // REMOTING_HOST_INPUT_INJECTOR_CHROMEOS_H_
\ No newline at end of file |