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/events_export.h" | 13 #include "ui/events/events_export.h" |
14 #include "ui/events/ozone/device/device_event_observer.h" | 14 #include "ui/events/ozone/device/device_event_observer.h" |
15 #include "ui/events/ozone/evdev/event_converter_evdev.h" | 15 #include "ui/events/ozone/evdev/event_converter_evdev.h" |
16 #include "ui/events/ozone/evdev/event_modifiers_evdev.h" | 16 #include "ui/events/ozone/evdev/event_modifiers_evdev.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 | 19 |
19 namespace ui { | 20 namespace ui { |
20 | 21 |
21 class CursorDelegateEvdev; | 22 class CursorDelegateEvdev; |
22 class DeviceManager; | 23 class DeviceManager; |
23 | 24 |
24 // Ozone events implementation for the Linux input subsystem ("evdev"). | 25 // Ozone events implementation for the Linux input subsystem ("evdev"). |
25 class EVENTS_EXPORT EventFactoryEvdev | 26 class EVENTS_EXPORT EventFactoryEvdev : public EventFactoryOzone, |
26 : public EventFactoryOzone, DeviceEventObserver { | 27 public DeviceEventObserver, |
| 28 public PlatformEventSource { |
27 public: | 29 public: |
28 EventFactoryEvdev(); | 30 EventFactoryEvdev(); |
29 EventFactoryEvdev(CursorDelegateEvdev* cursor, | 31 EventFactoryEvdev(CursorDelegateEvdev* cursor, |
30 DeviceManager* device_manager); | 32 DeviceManager* device_manager); |
31 virtual ~EventFactoryEvdev(); | 33 virtual ~EventFactoryEvdev(); |
32 | 34 |
33 void DispatchUiEvent(Event* event); | 35 void DispatchUiEvent(Event* event); |
34 | 36 |
35 // EventFactoryOzone: | 37 // EventFactoryOzone: |
36 virtual void StartProcessingEvents() OVERRIDE; | 38 virtual void StartProcessingEvents() OVERRIDE; |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 | 85 |
84 // Support weak pointers for attach & detach callbacks. | 86 // Support weak pointers for attach & detach callbacks. |
85 base::WeakPtrFactory<EventFactoryEvdev> weak_ptr_factory_; | 87 base::WeakPtrFactory<EventFactoryEvdev> weak_ptr_factory_; |
86 | 88 |
87 DISALLOW_COPY_AND_ASSIGN(EventFactoryEvdev); | 89 DISALLOW_COPY_AND_ASSIGN(EventFactoryEvdev); |
88 }; | 90 }; |
89 | 91 |
90 } // namespace ui | 92 } // namespace ui |
91 | 93 |
92 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_FACTORY_EVDEV_H_ | 94 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_FACTORY_EVDEV_H_ |
OLD | NEW |