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 UI_EVENTS_OZONE_EVDEV_INPUT_INJECTOR_EVDEV_H_
6 #define UI_EVENTS_OZONE_EVDEV_INPUT_INJECTOR_EVDEV_H_
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"
15 class CursorDelegateEvdev
;
17 class EventModifiersEvdev
;
19 class EVENTS_OZONE_EVDEV_EXPORT InputInjectorEvdev
20 : public SystemInputInjector
{
22 InputInjectorEvdev(EventModifiersEvdev
* modifiers
,
23 CursorDelegateEvdev
* cursor
,
24 KeyboardEvdev
* keyboard
,
25 const EventDispatchCallback
& callback
);
27 ~InputInjectorEvdev() override
;
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
;
36 // Modifier key state (shift, ctrl, etc).
37 EventModifiersEvdev
* modifiers_
;
39 // Shared cursor state.
40 CursorDelegateEvdev
* cursor_
;
42 // Shared keyboard state.
43 KeyboardEvdev
* keyboard_
;
45 // Callback for dispatching events.
46 EventDispatchCallback callback_
;
48 DISALLOW_COPY_AND_ASSIGN(InputInjectorEvdev
);
53 #endif // UI_EVENTS_OZONE_EVDEV_INPUT_INJECTOR_EVDEV_H_