blob: 1707c42a5e59e34ce054e89e603a6398678dc450 [file] [log] [blame]
kelvinp95f548402014-11-13 21:42:201// Copyright 2014 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef REMOTING_HOST_INPUT_INJECTOR_CHROMEOS_H_
6#define REMOTING_HOST_INPUT_INJECTOR_CHROMEOS_H_
7
avic5960f32015-12-22 22:49:488#include "base/macros.h"
kelvinp95f548402014-11-13 21:42:209#include "base/single_thread_task_runner.h"
10#include "remoting/host/input_injector.h"
11
12namespace remoting {
13
14// InputInjector implementation that translates input to ui::Events and passes
15// them to a supplied delegate for injection into ChromeOS.
16class InputInjectorChromeos : public InputInjector {
17 public:
18 explicit InputInjectorChromeos(
19 scoped_refptr<base::SingleThreadTaskRunner> task_runner);
20
21 ~InputInjectorChromeos() override;
22
23 // Clipboard stub interface.
24 void InjectClipboardEvent(const protocol::ClipboardEvent& event) override;
25
26 // InputStub interface.
27 void InjectKeyEvent(const protocol::KeyEvent& event) override;
28 void InjectTextEvent(const protocol::TextEvent& event) override;
29 void InjectMouseEvent(const protocol::MouseEvent& event) override;
rkuroiwa0e68803f2015-02-26 19:41:4230 void InjectTouchEvent(const protocol::TouchEvent& event) override;
kelvinp95f548402014-11-13 21:42:2031
32 // InputInjector interface.
dcheng0765c492016-04-06 22:41:5333 void Start(
34 std::unique_ptr<protocol::ClipboardStub> client_clipboard) override;
kelvinp95f548402014-11-13 21:42:2035
36 private:
kelvinpcc355312014-12-09 21:44:2537 class Core;
38
kelvinp95f548402014-11-13 21:42:2039 // Task runner for input injection.
40 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner_;
dcheng0765c492016-04-06 22:41:5341 std::unique_ptr<Core> core_;
kelvinp95f548402014-11-13 21:42:2042
43 DISALLOW_COPY_AND_ASSIGN(InputInjectorChromeos);
44};
45
46} // namespace remoting
47
48#endif // REMOTING_HOST_INPUT_INJECTOR_CHROMEOS_H_