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
;
16 class DeviceEventDispatcherEvdev
;
18 class EVENTS_OZONE_EVDEV_EXPORT InputInjectorEvdev
19 : public SystemInputInjector
{
21 InputInjectorEvdev(scoped_ptr
<DeviceEventDispatcherEvdev
> dispatcher
,
22 CursorDelegateEvdev
* cursor
);
24 ~InputInjectorEvdev() override
;
26 // SystemInputInjector implementation.
27 void InjectMouseButton(EventFlags button
, bool down
) override
;
28 void InjectMouseWheel(int delta_x
, int delta_y
) override
;
29 void MoveCursorTo(const gfx::PointF
& location
) override
;
30 void InjectKeyPress(DomCode physical_key
, bool down
) override
;
33 // Shared cursor state.
34 CursorDelegateEvdev
* cursor_
;
36 // Interface for dispatching events.
37 scoped_ptr
<DeviceEventDispatcherEvdev
> dispatcher_
;
39 DISALLOW_COPY_AND_ASSIGN(InputInjectorEvdev
);
44 #endif // UI_EVENTS_OZONE_EVDEV_INPUT_INJECTOR_EVDEV_H_