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_device_info.h" | 5 #include "ui/events/ozone/evdev/event_device_info.h" |
6 | 6 |
7 #include <linux/input.h> | 7 #include <linux/input.h> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/threading/thread_restrictions.h" | 10 #include "base/threading/thread_restrictions.h" |
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 EventDeviceInfo::ProbeLegacyAbsoluteDevice() const { | 336 EventDeviceInfo::ProbeLegacyAbsoluteDevice() const { |
337 if (!HasAbsXY()) | 337 if (!HasAbsXY()) |
338 return LegacyAbsoluteDeviceType::LADT_NONE; | 338 return LegacyAbsoluteDeviceType::LADT_NONE; |
339 | 339 |
340 if (HasStylus()) | 340 if (HasStylus()) |
341 return LegacyAbsoluteDeviceType::LADT_TABLET; | 341 return LegacyAbsoluteDeviceType::LADT_TABLET; |
342 | 342 |
343 if (HasKeyEvent(BTN_TOOL_FINGER) && HasKeyEvent(BTN_TOUCH)) | 343 if (HasKeyEvent(BTN_TOOL_FINGER) && HasKeyEvent(BTN_TOUCH)) |
344 return LegacyAbsoluteDeviceType::LADT_TOUCHPAD; | 344 return LegacyAbsoluteDeviceType::LADT_TOUCHPAD; |
345 | 345 |
346 if (HasKeyEvent(BTN_TOUCH) || HasKeyEvent(BTN_LEFT)) | 346 if (HasKeyEvent(BTN_TOUCH)) |
347 return LegacyAbsoluteDeviceType::LADT_TOUCHSCREEN; | 347 return LegacyAbsoluteDeviceType::LADT_TOUCHSCREEN; |
348 | 348 |
349 return LegacyAbsoluteDeviceType::LADT_NONE; | 349 return LegacyAbsoluteDeviceType::LADT_NONE; |
350 } | 350 } |
351 | 351 |
352 } // namespace ui | 352 } // namespace ui |
OLD | NEW |