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

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

Issue 193813003: ozone: evdev: Add libgestures bindings for touchpad & mouse support (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: moved 1 space by 1 character Created 6 years, 8 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 | Annotate | Revision Log
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/events_export.h" 13 #include "ui/events/events_export.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/event_factory_ozone.h" 16 #include "ui/events/ozone/event_factory_ozone.h"
17 17
18 namespace ui { 18 namespace ui {
19 19
20 class CursorDelegateEvdev; 20 class CursorDelegateEvdev;
21 class DeviceManagerEvdev; 21 class DeviceManagerEvdev;
22 22
23 // Ozone events implementation for the Linux input subsystem ("evdev"). 23 // Ozone events implementation for the Linux input subsystem ("evdev").
24 class EVENTS_EXPORT EventFactoryEvdev : public EventFactoryOzone { 24 class EVENTS_EXPORT EventFactoryEvdev : public EventFactoryOzone {
25 public: 25 public:
26 EventFactoryEvdev(); 26 EventFactoryEvdev();
27 explicit EventFactoryEvdev(CursorDelegateEvdev* cursor); 27 explicit EventFactoryEvdev(CursorDelegateEvdev* cursor);
28 virtual ~EventFactoryEvdev(); 28 virtual ~EventFactoryEvdev();
29 29
30 void DispatchEvent(Event* event);
31
30 // EventFactoryOzone: 32 // EventFactoryOzone:
31 virtual void StartProcessingEvents() OVERRIDE; 33 virtual void StartProcessingEvents() OVERRIDE;
32 virtual void SetFileTaskRunner(scoped_refptr<base::TaskRunner> task_runner) 34 virtual void SetFileTaskRunner(scoped_refptr<base::TaskRunner> task_runner)
33 OVERRIDE; 35 OVERRIDE;
34 virtual void WarpCursorTo(gfx::AcceleratedWidget widget, 36 virtual void WarpCursorTo(gfx::AcceleratedWidget widget,
35 const gfx::PointF& location) OVERRIDE; 37 const gfx::PointF& location) OVERRIDE;
36 38
37 private: 39 private:
38 // Open device at path & starting processing events (on UI thread). 40 // Open device at path & starting processing events (on UI thread).
39 void AttachInputDevice(const base::FilePath& file_path, 41 void AttachInputDevice(const base::FilePath& file_path,
(...skipping 19 matching lines...) Expand all
59 61
60 // Task runner for file I/O. 62 // Task runner for file I/O.
61 scoped_refptr<base::TaskRunner> file_task_runner_; 63 scoped_refptr<base::TaskRunner> file_task_runner_;
62 64
63 // Modifier key state (shift, ctrl, etc). 65 // Modifier key state (shift, ctrl, etc).
64 EventModifiersEvdev modifiers_; 66 EventModifiersEvdev modifiers_;
65 67
66 // Cursor movement. 68 // Cursor movement.
67 CursorDelegateEvdev* cursor_; 69 CursorDelegateEvdev* cursor_;
68 70
71 // Dispatch callback for events.
72 EventDispatchCallback dispatch_callback_;
73
69 // Support weak pointers for attach & detach callbacks. 74 // Support weak pointers for attach & detach callbacks.
70 base::WeakPtrFactory<EventFactoryEvdev> weak_ptr_factory_; 75 base::WeakPtrFactory<EventFactoryEvdev> weak_ptr_factory_;
71 76
72 DISALLOW_COPY_AND_ASSIGN(EventFactoryEvdev); 77 DISALLOW_COPY_AND_ASSIGN(EventFactoryEvdev);
73 }; 78 };
74 79
75 } // namespace ui 80 } // namespace ui
76 81
77 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_FACTORY_EVDEV_H_ 82 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_FACTORY_EVDEV_H_
OLDNEW
« no previous file with comments | « ui/events/ozone/evdev/event_device_info.cc ('k') | ui/events/ozone/evdev/event_factory_evdev.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698