Roll src/third_party/WebKit f36d5e0:68b67cd (svn 193299:193303)
[chromium-blink-merge.git] / remoting / host / input_injector_chromeos.h
blob02320f829eb00a495592bac054c705acc32bb747
1 // 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.
5 #ifndef REMOTING_HOST_INPUT_INJECTOR_CHROMEOS_H_
6 #define REMOTING_HOST_INPUT_INJECTOR_CHROMEOS_H_
8 #include "base/single_thread_task_runner.h"
9 #include "remoting/host/input_injector.h"
11 namespace remoting {
13 // InputInjector implementation that translates input to ui::Events and passes
14 // them to a supplied delegate for injection into ChromeOS.
15 class InputInjectorChromeos : public InputInjector {
16 public:
17 explicit InputInjectorChromeos(
18 scoped_refptr<base::SingleThreadTaskRunner> task_runner);
20 ~InputInjectorChromeos() override;
22 // Clipboard stub interface.
23 void InjectClipboardEvent(const protocol::ClipboardEvent& event) override;
25 // InputStub interface.
26 void InjectKeyEvent(const protocol::KeyEvent& event) override;
27 void InjectTextEvent(const protocol::TextEvent& event) override;
28 void InjectMouseEvent(const protocol::MouseEvent& event) override;
29 void InjectTouchEvent(const protocol::TouchEvent& event) override;
31 // InputInjector interface.
32 void Start(scoped_ptr<protocol::ClipboardStub> client_clipboard) override;
34 private:
35 class Core;
37 // Task runner for input injection.
38 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner_;
39 scoped_ptr<Core> core_;
41 DISALLOW_COPY_AND_ASSIGN(InputInjectorChromeos);
44 } // namespace remoting
46 #endif // REMOTING_HOST_INPUT_INJECTOR_CHROMEOS_H_