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 DeviceEventDispatcherEvdev; |
| 17 |
| 18 class EVENTS_OZONE_EVDEV_EXPORT InputInjectorEvdev |
| 19 : public SystemInputInjector { |
| 20 public: |
| 21 InputInjectorEvdev(scoped_ptr<DeviceEventDispatcherEvdev> dispatcher, |
| 22 CursorDelegateEvdev* cursor); |
| 23 |
| 24 ~InputInjectorEvdev() override; |
| 25 |
| 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 InjectKeyEvent(DomCode physical_key, |
| 31 bool down, |
| 32 bool suppress_auto_repeat) override; |
| 33 |
| 34 private: |
| 35 // Shared cursor state. |
| 36 CursorDelegateEvdev* cursor_; |
| 37 |
| 38 // Interface for dispatching events. |
| 39 scoped_ptr<DeviceEventDispatcherEvdev> dispatcher_; |
| 40 |
| 41 DISALLOW_COPY_AND_ASSIGN(InputInjectorEvdev); |
| 42 }; |
| 43 |
| 44 } // namespace ui |
| 45 |
| 46 #endif // UI_EVENTS_OZONE_EVDEV_INPUT_INJECTOR_EVDEV_H_ |
| 47 |
OLD | NEW |