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

Unified Diff: ui/events/ozone/evdev/touch_event_converter_evdev.h

Issue 561243002: ozone: evdev: Move read polling into EventConverterEvdev (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: ui/events/ozone/evdev/touch_event_converter_evdev.h
diff --git a/ui/events/ozone/evdev/touch_event_converter_evdev.h b/ui/events/ozone/evdev/touch_event_converter_evdev.h
index ee703f3658dff6c0808ec5bc5f13645220ab2702..eedb243b6c4fa8c188b27fdd0f9c01eee0b168f3 100644
--- a/ui/events/ozone/evdev/touch_event_converter_evdev.h
+++ b/ui/events/ozone/evdev/touch_event_converter_evdev.h
@@ -20,8 +20,7 @@ namespace ui {
class TouchEvent;
class EVENTS_OZONE_EVDEV_EXPORT TouchEventConverterEvdev
- : public EventConverterEvdev,
- public base::MessagePumpLibevent::Watcher {
+ : public EventConverterEvdev {
public:
enum {
MAX_FINGERS = 11
@@ -32,10 +31,6 @@ class EVENTS_OZONE_EVDEV_EXPORT TouchEventConverterEvdev
const EventDispatchCallback& dispatch);
virtual ~TouchEventConverterEvdev();
- // Start & stop watching for events.
- virtual void Start() OVERRIDE;
- virtual void Stop() OVERRIDE;
-
private:
friend class MockTouchEventConverterEvdev;
@@ -44,7 +39,6 @@ class EVENTS_OZONE_EVDEV_EXPORT TouchEventConverterEvdev
// Overidden from base::MessagePumpLibevent::Watcher.
virtual void OnFileCanReadWithoutBlocking(int fd) OVERRIDE;
- virtual void OnFileCanWriteWithoutBlocking(int fd) OVERRIDE;
virtual bool Reinitialize();
@@ -54,6 +48,9 @@ class EVENTS_OZONE_EVDEV_EXPORT TouchEventConverterEvdev
void ReportEvents(base::TimeDelta delta);
+ // Callback for dispatching events.
+ EventDispatchCallback callback_;
+
// Set if we have seen a SYN_DROPPED and not yet re-synced with the device.
bool syn_dropped_;
@@ -83,12 +80,6 @@ class EVENTS_OZONE_EVDEV_EXPORT TouchEventConverterEvdev
// Touch point currently being updated from the /dev/input/event* stream.
int current_slot_;
- // File descriptor for the /dev/input/event* instance.
- int fd_;
-
- // Path to input device.
- base::FilePath path_;
-
// Bit field tracking which in-progress touch points have been modified
// without a syn event.
std::bitset<MAX_FINGERS> altered_slots_;
@@ -108,9 +99,6 @@ class EVENTS_OZONE_EVDEV_EXPORT TouchEventConverterEvdev
// In-progress touch points.
InProgressEvents events_[MAX_FINGERS];
- // Controller for watching the input fd.
- base::MessagePumpLibevent::FileDescriptorWatcher controller_;
-
DISALLOW_COPY_AND_ASSIGN(TouchEventConverterEvdev);
};

Powered by Google App Engine
This is Rietveld 408576698