| 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_EVENT_FACTORY_EVDEV_H_ | 5 #ifndef UI_EVENTS_OZONE_EVDEV_EVENT_FACTORY_EVDEV_H_ |
| 6 #define UI_EVENTS_OZONE_EVDEV_EVENT_FACTORY_EVDEV_H_ | 6 #define UI_EVENTS_OZONE_EVDEV_EVENT_FACTORY_EVDEV_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "base/task_runner.h" | 12 #include "base/task_runner.h" |
| 13 #include "ui/events/ozone/device/device_event_observer.h" | 13 #include "ui/events/ozone/device/device_event_observer.h" |
| 14 #include "ui/events/ozone/evdev/event_converter_evdev.h" | 14 #include "ui/events/ozone/evdev/event_converter_evdev.h" |
| 15 #include "ui/events/ozone/evdev/event_modifiers_evdev.h" | 15 #include "ui/events/ozone/evdev/event_modifiers_evdev.h" |
| 16 #include "ui/events/ozone/evdev/events_ozone_evdev_export.h" | 16 #include "ui/events/ozone/evdev/events_ozone_evdev_export.h" |
| 17 #include "ui/events/ozone/event_factory_ozone.h" | 17 #include "ui/events/ozone/event_factory_ozone.h" |
| 18 #include "ui/events/platform/platform_event_source.h" | 18 #include "ui/events/platform/platform_event_source.h" |
| 19 | 19 |
| 20 namespace ui { | 20 namespace ui { |
| 21 | 21 |
| 22 class CursorDelegateEvdev; | 22 class CursorDelegateEvdev; |
| 23 class DeviceManager; | 23 class DeviceManager; |
| 24 | 24 |
| 25 // Ozone events implementation for the Linux input subsystem ("evdev"). | 25 // Ozone events implementation for the Linux input subsystem ("evdev"). |
| 26 class EVENTS_OZONE_EVDEV_EXPORT EventFactoryEvdev : public EventFactoryOzone, | 26 class EVENTS_OZONE_EVDEV_EXPORT EventFactoryEvdev : public EventFactoryOzone, |
| 27 public DeviceEventObserver, | 27 public DeviceEventObserver, |
| 28 public PlatformEventSource { | 28 public PlatformEventSource { |
| 29 public: | 29 public: |
| 30 EventFactoryEvdev(); | |
| 31 EventFactoryEvdev(CursorDelegateEvdev* cursor, | 30 EventFactoryEvdev(CursorDelegateEvdev* cursor, |
| 32 DeviceManager* device_manager); | 31 DeviceManager* device_manager); |
| 33 virtual ~EventFactoryEvdev(); | 32 virtual ~EventFactoryEvdev(); |
| 34 | 33 |
| 35 void DispatchUiEvent(Event* event); | 34 void DispatchUiEvent(Event* event); |
| 36 | 35 |
| 37 // EventFactoryOzone: | 36 // EventFactoryOzone: |
| 38 virtual void StartProcessingEvents() OVERRIDE; | 37 virtual void StartProcessingEvents() OVERRIDE; |
| 39 virtual void WarpCursorTo(gfx::AcceleratedWidget widget, | 38 virtual void WarpCursorTo(gfx::AcceleratedWidget widget, |
| 40 const gfx::PointF& location) OVERRIDE; | 39 const gfx::PointF& location) OVERRIDE; |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 | 79 |
| 81 // Support weak pointers for attach & detach callbacks. | 80 // Support weak pointers for attach & detach callbacks. |
| 82 base::WeakPtrFactory<EventFactoryEvdev> weak_ptr_factory_; | 81 base::WeakPtrFactory<EventFactoryEvdev> weak_ptr_factory_; |
| 83 | 82 |
| 84 DISALLOW_COPY_AND_ASSIGN(EventFactoryEvdev); | 83 DISALLOW_COPY_AND_ASSIGN(EventFactoryEvdev); |
| 85 }; | 84 }; |
| 86 | 85 |
| 87 } // namespace ui | 86 } // namespace ui |
| 88 | 87 |
| 89 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_FACTORY_EVDEV_H_ | 88 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_FACTORY_EVDEV_H_ |
| OLD | NEW |