| Index: ui/events/ozone/evdev/touch_event_converter.cc
|
| diff --git a/ui/events/ozone/evdev/touch_event_converter.cc b/ui/events/ozone/evdev/touch_event_converter.cc
|
| index d21225e3f36638d703e0a1405a865e1e866c2ca5..15766edfb8e8498e13a5e4b81006e44fa7580cb2 100644
|
| --- a/ui/events/ozone/evdev/touch_event_converter.cc
|
| +++ b/ui/events/ozone/evdev/touch_event_converter.cc
|
| @@ -32,22 +32,22 @@ const float kFingerWidth = 25.f;
|
|
|
| namespace ui {
|
|
|
| -TouchEventConverterEvdev::TouchEventConverterEvdev(int fd, base::FilePath path)
|
| - : pressure_min_(0),
|
| +TouchEventConverterEvdev::TouchEventConverterEvdev(
|
| + int fd,
|
| + base::FilePath path,
|
| + EventModifiersEvdev* modifiers)
|
| + : EventConverterEvdev(fd, path, modifiers),
|
| + pressure_min_(0),
|
| pressure_max_(0),
|
| x_scale_(1.),
|
| y_scale_(1.),
|
| x_max_(std::numeric_limits<int>::max()),
|
| y_max_(std::numeric_limits<int>::max()),
|
| - current_slot_(0),
|
| - fd_(fd),
|
| - path_(path) {
|
| + current_slot_(0) {
|
| Init();
|
| }
|
|
|
| TouchEventConverterEvdev::~TouchEventConverterEvdev() {
|
| - if (fd_ >= 0 && close(fd_) < 0)
|
| - DLOG(WARNING) << "failed close on " << path_.value();
|
| }
|
|
|
| void TouchEventConverterEvdev::Init() {
|
| @@ -99,18 +99,9 @@ void TouchEventConverterEvdev::Init() {
|
| }
|
| }
|
|
|
| -void TouchEventConverterEvdev::OnFileCanWriteWithoutBlocking(int /* fd */) {
|
| - // Read-only file-descriptors.
|
| - NOTREACHED();
|
| -}
|
| -
|
| -void TouchEventConverterEvdev::OnFileCanReadWithoutBlocking(int fd) {
|
| - input_event inputs[MAX_FINGERS * 6 + 1];
|
| - ssize_t read_size = read(fd, inputs, sizeof(inputs));
|
| - if (read_size <= 0)
|
| - return;
|
| -
|
| - for (unsigned i = 0; i < read_size / sizeof(*inputs); i++) {
|
| +void TouchEventConverterEvdev::ProcessEvents(const struct input_event* inputs,
|
| + int count) {
|
| + for (int i = 0; i < count; i++) {
|
| const input_event& input = inputs[i];
|
| if (input.type == EV_ABS) {
|
| switch (input.code) {
|
|
|