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

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

Issue 790153005: ozone: evdev: Add property to identify internal or external devices (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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.cc
diff --git a/ui/events/ozone/evdev/touch_event_converter_evdev.cc b/ui/events/ozone/evdev/touch_event_converter_evdev.cc
index 63fde53491edbab68a1838c18b8814ca1b2c832f..ae0293c97cdb61b86865d1d90f0aa84be7571d59 100644
--- a/ui/events/ozone/evdev/touch_event_converter_evdev.cc
+++ b/ui/events/ozone/evdev/touch_event_converter_evdev.cc
@@ -74,13 +74,13 @@ TouchEventConverterEvdev::TouchEventConverterEvdev(
int fd,
base::FilePath path,
int id,
+ InputDeviceType type,
const EventDispatchCallback& callback)
- : EventConverterEvdev(fd, path, id),
+ : EventConverterEvdev(fd, path, id, type),
callback_(callback),
syn_dropped_(false),
is_type_a_(false),
- current_slot_(0),
- is_internal_(GetInputDeviceTypeFromPath(path) == INPUT_DEVICE_INTERNAL) {
+ current_slot_(0) {
}
TouchEventConverterEvdev::~TouchEventConverterEvdev() {
@@ -97,7 +97,7 @@ void TouchEventConverterEvdev::Initialize(const EventDeviceInfo& info) {
y_num_tuxels_ = info.GetAbsMaximum(ABS_MT_POSITION_Y) - y_min_tuxels_ + 1;
// Apply --touch-calibration.
- if (is_internal_) {
+ if (type() == INPUT_DEVICE_INTERNAL) {
TouchCalibration cal = {};
GetTouchCalibration(&cal);
x_min_tuxels_ += cal.bezel_left;
@@ -144,10 +144,6 @@ gfx::Size TouchEventConverterEvdev::GetTouchscreenSize() const {
return native_size_;
}
-bool TouchEventConverterEvdev::IsInternal() const {
- return is_internal_;
-}
-
void TouchEventConverterEvdev::OnFileCanReadWithoutBlocking(int fd) {
input_event inputs[MAX_FINGERS * 6 + 1];
ssize_t read_size = read(fd, inputs, sizeof(inputs));
« no previous file with comments | « ui/events/ozone/evdev/touch_event_converter_evdev.h ('k') | ui/events/ozone/evdev/touch_event_converter_evdev_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698