| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "ui/events/ozone/evdev/event_factory.h" | 5 #include "ui/events/ozone/evdev/event_factory.h" |
| 6 | 6 |
| 7 #include <errno.h> | 7 #include <errno.h> |
| 8 #include <fcntl.h> | 8 #include <fcntl.h> |
| 9 #include <linux/input.h> | 9 #include <linux/input.h> |
| 10 #include <poll.h> | 10 #include <poll.h> |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 converter->Start(); | 75 converter->Start(); |
| 76 converters_[path] = converter.release(); | 76 converters_[path] = converter.release(); |
| 77 } else { | 77 } else { |
| 78 close(fd); | 78 close(fd); |
| 79 } | 79 } |
| 80 } | 80 } |
| 81 | 81 |
| 82 void EventFactoryEvdev::StartProcessingEvents() { | 82 void EventFactoryEvdev::StartProcessingEvents() { |
| 83 base::ThreadRestrictions::AssertIOAllowed(); | 83 base::ThreadRestrictions::AssertIOAllowed(); |
| 84 | 84 |
| 85 base::FileEnumerator file_enum( | 85 base::FileEnumerator file_enum(base::FilePath("/dev/input"), |
| 86 base::FilePath("/dev/input"), false, base::FileEnumerator::FILES); | 86 false, |
| 87 base::FileEnumerator::FILES, |
| 88 "event*[0-9]"); |
| 87 for (base::FilePath path = file_enum.Next(); !path.empty(); | 89 for (base::FilePath path = file_enum.Next(); !path.empty(); |
| 88 path = file_enum.Next()) | 90 path = file_enum.Next()) |
| 89 AttachInputDevice(path); | 91 AttachInputDevice(path); |
| 90 } | 92 } |
| 91 | 93 |
| 92 } // namespace ui | 94 } // namespace ui |
| OLD | NEW |