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

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

Issue 661353006: ozone: evdev: Dispatch events in task (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix tests 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"
(...skipping 17 matching lines...) Expand all
28 class DeviceManager; 28 class DeviceManager;
29 29
30 // Ozone events implementation for the Linux input subsystem ("evdev"). 30 // Ozone events implementation for the Linux input subsystem ("evdev").
31 class EVENTS_OZONE_EVDEV_EXPORT EventFactoryEvdev : public DeviceEventObserver, 31 class EVENTS_OZONE_EVDEV_EXPORT EventFactoryEvdev : public DeviceEventObserver,
32 public PlatformEventSource { 32 public PlatformEventSource {
33 public: 33 public:
34 EventFactoryEvdev(CursorDelegateEvdev* cursor, 34 EventFactoryEvdev(CursorDelegateEvdev* cursor,
35 DeviceManager* device_manager); 35 DeviceManager* device_manager);
36 virtual ~EventFactoryEvdev(); 36 virtual ~EventFactoryEvdev();
37 37
38 void DispatchUiEvent(Event* event);
39
40 void WarpCursorTo(gfx::AcceleratedWidget widget, 38 void WarpCursorTo(gfx::AcceleratedWidget widget,
41 const gfx::PointF& location); 39 const gfx::PointF& location);
42 40
43 private: 41 private:
42 // Post a task to dispatch an event.
43 void PostUiEvent(scoped_ptr<Event> event);
44
45 // Dispatch event via PlatformEventSource.
46 void DispatchUiEventTask(scoped_ptr<Event> event);
47
44 // Open device at path & starting processing events (on UI thread). 48 // Open device at path & starting processing events (on UI thread).
45 void AttachInputDevice(scoped_ptr<EventConverterEvdev> converter); 49 void AttachInputDevice(scoped_ptr<EventConverterEvdev> converter);
46 50
47 // Close device at path (on UI thread). 51 // Close device at path (on UI thread).
48 void DetachInputDevice(const base::FilePath& file_path); 52 void DetachInputDevice(const base::FilePath& file_path);
49 53
50 void NotifyHotplugEventObserver(const EventConverterEvdev& converter); 54 void NotifyHotplugEventObserver(const EventConverterEvdev& converter);
51 55
52 int NextDeviceId(); 56 int NextDeviceId();
53 57
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 89
86 // Support weak pointers for attach & detach callbacks. 90 // Support weak pointers for attach & detach callbacks.
87 base::WeakPtrFactory<EventFactoryEvdev> weak_ptr_factory_; 91 base::WeakPtrFactory<EventFactoryEvdev> weak_ptr_factory_;
88 92
89 DISALLOW_COPY_AND_ASSIGN(EventFactoryEvdev); 93 DISALLOW_COPY_AND_ASSIGN(EventFactoryEvdev);
90 }; 94 };
91 95
92 } // namespace ui 96 } // namespace ui
93 97
94 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_FACTORY_EVDEV_H_ 98 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_FACTORY_EVDEV_H_
OLDNEW
« no previous file with comments | « ui/events/ozone/evdev/event_dispatch_callback.h ('k') | ui/events/ozone/evdev/event_factory_evdev.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698