| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef UI_EVENTS_OZONE_EVDEV_INPUT_INJECTOR_EVDEV_H_ | 5 #ifndef UI_EVENTS_OZONE_EVDEV_INPUT_INJECTOR_EVDEV_H_ |
| 6 #define UI_EVENTS_OZONE_EVDEV_INPUT_INJECTOR_EVDEV_H_ | 6 #define UI_EVENTS_OZONE_EVDEV_INPUT_INJECTOR_EVDEV_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "ui/events/ozone/evdev/event_dispatch_callback.h" | 9 #include "ui/events/ozone/evdev/event_dispatch_callback.h" |
| 10 #include "ui/events/ozone/evdev/events_ozone_evdev_export.h" | 10 #include "ui/events/ozone/evdev/events_ozone_evdev_export.h" |
| 11 #include "ui/ozone/public/system_input_injector.h" | 11 #include "ui/ozone/public/system_input_injector.h" |
| 12 | 12 |
| 13 namespace ui { | 13 namespace ui { |
| 14 | 14 |
| 15 class Event; | 15 class Event; |
| 16 class CursorDelegateEvdev; | 16 class CursorDelegateEvdev; |
| 17 class DeviceEventDispatcherEvdev; | 17 class DeviceEventDispatcherEvdev; |
| 18 | 18 |
| 19 class EVENTS_OZONE_EVDEV_EXPORT InputInjectorEvdev | 19 class EVENTS_OZONE_EVDEV_EXPORT InputInjectorEvdev |
| 20 : public SystemInputInjector { | 20 : public SystemInputInjector { |
| 21 public: | 21 public: |
| 22 InputInjectorEvdev(scoped_ptr<DeviceEventDispatcherEvdev> dispatcher, | 22 InputInjectorEvdev(std::unique_ptr<DeviceEventDispatcherEvdev> dispatcher, |
| 23 CursorDelegateEvdev* cursor); | 23 CursorDelegateEvdev* cursor); |
| 24 | 24 |
| 25 ~InputInjectorEvdev() override; | 25 ~InputInjectorEvdev() override; |
| 26 | 26 |
| 27 // SystemInputInjector implementation. | 27 // SystemInputInjector implementation. |
| 28 void InjectMouseButton(EventFlags button, bool down) override; | 28 void InjectMouseButton(EventFlags button, bool down) override; |
| 29 void InjectMouseWheel(int delta_x, int delta_y) override; | 29 void InjectMouseWheel(int delta_x, int delta_y) override; |
| 30 void MoveCursorTo(const gfx::PointF& location) override; | 30 void MoveCursorTo(const gfx::PointF& location) override; |
| 31 void InjectKeyEvent(DomCode physical_key, | 31 void InjectKeyEvent(DomCode physical_key, |
| 32 bool down, | 32 bool down, |
| 33 bool suppress_auto_repeat) override; | 33 bool suppress_auto_repeat) override; |
| 34 | 34 |
| 35 private: | 35 private: |
| 36 // Shared cursor state. | 36 // Shared cursor state. |
| 37 CursorDelegateEvdev* cursor_; | 37 CursorDelegateEvdev* cursor_; |
| 38 | 38 |
| 39 // Interface for dispatching events. | 39 // Interface for dispatching events. |
| 40 scoped_ptr<DeviceEventDispatcherEvdev> dispatcher_; | 40 std::unique_ptr<DeviceEventDispatcherEvdev> dispatcher_; |
| 41 | 41 |
| 42 DISALLOW_COPY_AND_ASSIGN(InputInjectorEvdev); | 42 DISALLOW_COPY_AND_ASSIGN(InputInjectorEvdev); |
| 43 }; | 43 }; |
| 44 | 44 |
| 45 } // namespace ui | 45 } // namespace ui |
| 46 | 46 |
| 47 #endif // UI_EVENTS_OZONE_EVDEV_INPUT_INJECTOR_EVDEV_H_ | 47 #endif // UI_EVENTS_OZONE_EVDEV_INPUT_INJECTOR_EVDEV_H_ |
| 48 | 48 |
| OLD | NEW |