| OLD | NEW |
| (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 // SystemInputInjector implementation. |
| 28 void InjectMouseButton(EventFlags button, bool down) override; |
| 29 void InjectMouseWheel(int delta_x, int delta_y) override; |
| 30 void MoveCursorTo(const gfx::PointF& location) override; |
| 31 void InjectKeyPress(DomCode physical_key, bool down) override; |
| 32 |
| 33 private: |
| 34 // Modifier key state (shift, ctrl, etc). |
| 35 EventModifiersEvdev* modifiers_; |
| 36 |
| 37 // Shared cursor state. |
| 38 CursorDelegateEvdev* cursor_; |
| 39 |
| 40 // Shared keyboard state. |
| 41 KeyboardEvdev* keyboard_; |
| 42 |
| 43 // Callback for dispatching events. |
| 44 EventDispatchCallback callback_; |
| 45 |
| 46 DISALLOW_COPY_AND_ASSIGN(InputInjectorEvDev); |
| 47 }; |
| 48 |
| 49 } // namespace ui |
| 50 |
| 51 #endif // UI_EVENTS_OZONE_EVDEV_INPUT_INJECTOR_EVDEV_H_ |
| 52 |
| OLD | NEW |