diff options
author | kelvinp <kelvinp@chromium.org> | 2014-11-10 18:45:25 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-11-11 02:45:51 +0000 |
commit | 1d3fbc02ea36d1054ed570bdf2fdb2d46e88e9ba (patch) | |
tree | 275d805d3fa559963862799905e22faadd5d4c87 /remoting/host/input_injector_chromeos.h | |
parent | ada4a807bb8953b86bbc6c573a0a6c07801f91a9 (diff) | |
download | chromium_src-1d3fbc02ea36d1054ed570bdf2fdb2d46e88e9ba.zip chromium_src-1d3fbc02ea36d1054ed570bdf2fdb2d46e88e9ba.tar.gz chromium_src-1d3fbc02ea36d1054ed570bdf2fdb2d46e88e9ba.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
Review URL: https://codereview.chromium.org/700333007
Cr-Commit-Position: refs/heads/master@{#303578}
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 |