Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(179)

Side by Side Diff: ui/events/ozone/evdev/event_factory_evdev.h

Issue 545063006: ozone: evdev: Add gesture property provider (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed previous comments. Refactored the code per style guide. Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 24 matching lines...) Expand all
63 67
64 // Task runner for event dispatch. 68 // Task runner for event dispatch.
65 scoped_refptr<base::TaskRunner> ui_task_runner_; 69 scoped_refptr<base::TaskRunner> ui_task_runner_;
66 70
67 // Modifier key state (shift, ctrl, etc). 71 // Modifier key state (shift, ctrl, etc).
68 EventModifiersEvdev modifiers_; 72 EventModifiersEvdev modifiers_;
69 73
70 // Cursor movement. 74 // Cursor movement.
71 CursorDelegateEvdev* cursor_; 75 CursorDelegateEvdev* cursor_;
72 76
77 #if defined(USE_EVDEV_GESTURES)
78 // Gesture library property provider (used by touchpads/mice).
79 scoped_ptr<GesturePropertyProvider> gesture_prop_provider_;
80 #endif
81
73 // Dispatch callback for events. 82 // Dispatch callback for events.
74 EventDispatchCallback dispatch_callback_; 83 EventDispatchCallback dispatch_callback_;
75 84
76 // Support weak pointers for attach & detach callbacks. 85 // Support weak pointers for attach & detach callbacks.
77 base::WeakPtrFactory<EventFactoryEvdev> weak_ptr_factory_; 86 base::WeakPtrFactory<EventFactoryEvdev> weak_ptr_factory_;
78 87
79 DISALLOW_COPY_AND_ASSIGN(EventFactoryEvdev); 88 DISALLOW_COPY_AND_ASSIGN(EventFactoryEvdev);
80 }; 89 };
81 90
82 } // namespace ui 91 } // namespace ui
83 92
84 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_FACTORY_EVDEV_H_ 93 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_FACTORY_EVDEV_H_
OLDNEW
« no previous file with comments | « no previous file | ui/events/ozone/evdev/event_factory_evdev.cc » ('j') | ui/events/ozone/evdev/event_factory_evdev.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698