| 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/platform/platform_event_source.h" | 17 #include "ui/events/platform/platform_event_source.h" |
| 18 #include "ui/gfx/native_widget_types.h" | 18 #include "ui/gfx/native_widget_types.h" |
| 19 | 19 |
| 20 namespace gfx { | 20 namespace gfx { |
| 21 class PointF; | 21 class PointF; |
| 22 } // namespace gfx | 22 } // namespace gfx |
| 23 | 23 |
| 24 namespace ui { | 24 namespace ui { |
| 25 | 25 |
| 26 class CursorDelegateEvdev; | 26 class CursorDelegateEvdev; |
| 27 class DeviceManager; | 27 class DeviceManager; |
| 28 | 28 |
| 29 #if defined(USE_EVDEV_GESTURES) |
| 30 class GesturePropertyProvider; |
| 31 #endif |
| 32 |
| 29 // Ozone events implementation for the Linux input subsystem ("evdev"). | 33 // Ozone events implementation for the Linux input subsystem ("evdev"). |
| 30 class EVENTS_OZONE_EVDEV_EXPORT EventFactoryEvdev : public DeviceEventObserver, | 34 class EVENTS_OZONE_EVDEV_EXPORT EventFactoryEvdev : public DeviceEventObserver, |
| 31 public PlatformEventSource { | 35 public PlatformEventSource { |
| 32 public: | 36 public: |
| 33 EventFactoryEvdev(CursorDelegateEvdev* cursor, | 37 EventFactoryEvdev(CursorDelegateEvdev* cursor, |
| 34 DeviceManager* device_manager); | 38 DeviceManager* device_manager); |
| 35 virtual ~EventFactoryEvdev(); | 39 virtual ~EventFactoryEvdev(); |
| 36 | 40 |
| 37 void DispatchUiEvent(Event* event); | 41 void DispatchUiEvent(Event* event); |
| 38 | 42 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 69 | 73 |
| 70 // Task runner for event dispatch. | 74 // Task runner for event dispatch. |
| 71 scoped_refptr<base::TaskRunner> ui_task_runner_; | 75 scoped_refptr<base::TaskRunner> ui_task_runner_; |
| 72 | 76 |
| 73 // Modifier key state (shift, ctrl, etc). | 77 // Modifier key state (shift, ctrl, etc). |
| 74 EventModifiersEvdev modifiers_; | 78 EventModifiersEvdev modifiers_; |
| 75 | 79 |
| 76 // Cursor movement. | 80 // Cursor movement. |
| 77 CursorDelegateEvdev* cursor_; | 81 CursorDelegateEvdev* cursor_; |
| 78 | 82 |
| 83 #if defined(USE_EVDEV_GESTURES) |
| 84 // Gesture library property provider (used by touchpads/mice). |
| 85 scoped_ptr<GesturePropertyProvider> gesture_property_provider_; |
| 86 #endif |
| 87 |
| 79 // Dispatch callback for events. | 88 // Dispatch callback for events. |
| 80 EventDispatchCallback dispatch_callback_; | 89 EventDispatchCallback dispatch_callback_; |
| 81 | 90 |
| 82 // Support weak pointers for attach & detach callbacks. | 91 // Support weak pointers for attach & detach callbacks. |
| 83 base::WeakPtrFactory<EventFactoryEvdev> weak_ptr_factory_; | 92 base::WeakPtrFactory<EventFactoryEvdev> weak_ptr_factory_; |
| 84 | 93 |
| 85 DISALLOW_COPY_AND_ASSIGN(EventFactoryEvdev); | 94 DISALLOW_COPY_AND_ASSIGN(EventFactoryEvdev); |
| 86 }; | 95 }; |
| 87 | 96 |
| 88 } // namespace ui | 97 } // namespace ui |
| 89 | 98 |
| 90 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_FACTORY_EVDEV_H_ | 99 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_FACTORY_EVDEV_H_ |
| OLD | NEW |