| 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 f522921da46912af1c748c8d0a72f1ceb009ac80..45bfaeda5b631ed3c65cd8482343809ddabc1aee 100644
|
| --- a/ui/events/ozone/evdev/touch_event_converter_evdev.h
|
| +++ b/ui/events/ozone/evdev/touch_event_converter_evdev.h
|
| @@ -9,6 +9,7 @@
|
|
|
| #include "base/compiler_specific.h"
|
| #include "base/files/file_path.h"
|
| +#include "base/memory/scoped_ptr.h"
|
| #include "base/message_loop/message_pump_libevent.h"
|
| #include "ui/events/event_constants.h"
|
| #include "ui/events/ozone/evdev/event_converter_evdev.h"
|
| @@ -17,14 +18,14 @@
|
|
|
| namespace ui {
|
|
|
| -class TouchEvent;
|
| -
|
| class DeviceEventDispatcherEvdev;
|
| +class TouchEvent;
|
| +class TouchNoiseFinder;
|
| +struct InProgressTouchEvdev;
|
|
|
| class EVENTS_OZONE_EVDEV_EXPORT TouchEventConverterEvdev
|
| : public EventConverterEvdev {
|
| public:
|
| - enum { MAX_FINGERS = 20 };
|
| TouchEventConverterEvdev(int fd,
|
| base::FilePath path,
|
| int id,
|
| @@ -43,21 +44,6 @@ class EVENTS_OZONE_EVDEV_EXPORT TouchEventConverterEvdev
|
| private:
|
| friend class MockTouchEventConverterEvdev;
|
|
|
| - struct InProgressEvents {
|
| - InProgressEvents();
|
| -
|
| - bool altered_;
|
| - float x_;
|
| - float y_;
|
| - int id_; // Device reported "unique" touch point id; -1 means not active
|
| - int finger_; // "Finger" id starting from 0; -1 means not active
|
| -
|
| - EventType type_;
|
| - float radius_x_;
|
| - float radius_y_;
|
| - float pressure_;
|
| - };
|
| -
|
| // Overidden from base::MessagePumpLibevent::Watcher.
|
| void OnFileCanReadWithoutBlocking(int fd) override;
|
|
|
| @@ -67,8 +53,13 @@ class EVENTS_OZONE_EVDEV_EXPORT TouchEventConverterEvdev
|
| void ProcessAbs(const input_event& input);
|
| void ProcessSyn(const input_event& input);
|
|
|
| - void ReportEvent(int touch_id,
|
| - const InProgressEvents& event, const base::TimeDelta& delta);
|
| + // Returns an EventType to dispatch for |touch|. Returns ET_UNKNOWN if an
|
| + // event should not be dispatched.
|
| + EventType GetEventTypeForTouch(const InProgressTouchEvdev& touch);
|
| +
|
| + void ReportEvent(const InProgressTouchEvdev& event,
|
| + EventType event_type,
|
| + const base::TimeDelta& delta);
|
| void ReportEvents(base::TimeDelta delta);
|
|
|
| // Dispatcher for events.
|
| @@ -102,7 +93,10 @@ class EVENTS_OZONE_EVDEV_EXPORT TouchEventConverterEvdev
|
| size_t current_slot_;
|
|
|
| // In-progress touch points.
|
| - std::vector<InProgressEvents> events_;
|
| + std::vector<InProgressTouchEvdev> events_;
|
| +
|
| + // Finds touch noise.
|
| + scoped_ptr<TouchNoiseFinder> touch_noise_finder_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(TouchEventConverterEvdev);
|
| };
|
|
|