base: Change DCHECK_IS_ON to a macro DCHECK_IS_ON().
[chromium-blink-merge.git] / ui / events / ozone / evdev / input_injector_evdev.h
blob6390b42183d2d00cf51a892c5e3a34ff14c3c0dc
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"
12 namespace ui {
14 class Event;
15 class CursorDelegateEvdev;
16 class KeyboardEvdev;
17 class EventModifiersEvdev;
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);
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;
35 private:
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);
51 } // namespace ui
53 #endif // UI_EVENTS_OZONE_EVDEV_INPUT_INJECTOR_EVDEV_H_