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

Unified Diff: ui/base/touch/touch_device_aurax11.cc

Issue 845413002: touch: Change how touch-screen capability is processed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 11 months 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
« no previous file with comments | « ash/virtual_keyboard_controller_unittest.cc ('k') | ui/events/devices/touchscreen_device.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/touch/touch_device_aurax11.cc
diff --git a/ui/base/touch/touch_device_aurax11.cc b/ui/base/touch/touch_device_aurax11.cc
index e69c943cf2fd4877c494692ea1bea6d5f15aaecd..723fb0a0fd1fa93997055d84c31bc2ddb5981128 100644
--- a/ui/base/touch/touch_device_aurax11.cc
+++ b/ui/base/touch/touch_device_aurax11.cc
@@ -6,7 +6,6 @@
#include "base/logging.h"
#include "ui/events/devices/device_data_manager.h"
-#include "ui/events/devices/x11/touch_factory_x11.h"
namespace ui {
@@ -15,7 +14,14 @@ bool IsTouchDevicePresent() {
}
int MaxTouchPoints() {
- return ui::TouchFactory::GetInstance()->GetMaxTouchPoints();
+ int max_touch = -1;
+ const std::vector<ui::TouchscreenDevice>& touchscreen_devices =
+ ui::DeviceDataManager::GetInstance()->touchscreen_devices();
+ for (const ui::TouchscreenDevice& device : touchscreen_devices) {
+ if (device.touch_points > max_touch)
+ max_touch = device.touch_points;
+ }
+ return max_touch;
}
// TODO(mustaq@chromium.org): Use mouse detection logic. crbug.com/440503
« no previous file with comments | « ash/virtual_keyboard_controller_unittest.cc ('k') | ui/events/devices/touchscreen_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698