Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: ui/events/ozone/evdev/input_injector_evdev.h

Issue 755883002: Input Injection API on Ozone (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add unit test Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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.
4
5 #ifndef UI_EVENTS_OZONE_EVDEV_INPUT_INJECTOR_EVDEV_H_
6 #define UI_EVENTS_OZONE_EVDEV_INPUT_INJECTOR_EVDEV_H_
7
8 #include "ui/events/ozone/evdev/event_dispatch_callback.h"
9 #include "ui/events/ozone/evdev/events_ozone_evdev_export.h"
10 #include "ui/ozone/public/system_input_injector.h"
11
12 namespace ui {
13
14 class Event;
15 class CursorDelegateEvdev;
16 class KeyboardEvdev;
17 class EventModifiersEvdev;
18
19 class EVENTS_OZONE_EVDEV_EXPORT InputInjectorEvdev
20 : public SystemInputInjector {
21 public:
22 InputInjectorEvdev(EventModifiersEvdev* modifiers,
23 CursorDelegateEvdev* cursor,
24 KeyboardEvdev* keyboard,
25 const EventDispatchCallback& callback);
26
27 ~InputInjectorEvdev() override;
28
29 // SystemInputInjector implementation.
30 void InjectMouseButton(EventFlags button, bool down) override;
31 void InjectMouseWheel(int delta_x, int delta_y) override;
32 void MoveCursorTo(const gfx::PointF& location) override;
33 void InjectKeyPress(DomCode physical_key, bool down) override;
34
35 private:
36 // Modifier key state (shift, ctrl, etc).
37 EventModifiersEvdev* modifiers_;
38
39 // Shared cursor state.
40 CursorDelegateEvdev* cursor_;
41
42 // Shared keyboard state.
43 KeyboardEvdev* keyboard_;
44
45 // Callback for dispatching events.
46 EventDispatchCallback callback_;
47
48 DISALLOW_COPY_AND_ASSIGN(InputInjectorEvdev);
49 };
50
51 } // namespace ui
52
53 #endif // UI_EVENTS_OZONE_EVDEV_INPUT_INJECTOR_EVDEV_H_
54
OLDNEW
« no previous file with comments | « ui/events/ozone/evdev/event_factory_evdev.cc ('k') | ui/events/ozone/evdev/input_injector_evdev.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698