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 |