summaryrefslogtreecommitdiffstats
path: root/ash
diff options
context:
space:
mode:
authorafakhry <afakhry@chromium.org>2015-12-01 15:50:04 -0800
committerCommit bot <commit-bot@chromium.org>2015-12-01 23:51:02 +0000
commit661e756abf12e911d936464034e93ca7690558ae (patch)
treec9ace8ff5c27281349d62c3eba739a637770f806 /ash
parentd2e6cadd9d2542ec4b293c94accad2226b79bc7b (diff)
downloadchromium_src-661e756abf12e911d936464034e93ca7690558ae.zip
chromium_src-661e756abf12e911d936464034e93ca7690558ae.tar.gz
chromium_src-661e756abf12e911d936464034e93ca7690558ae.tar.bz2
Improve checking for the status of touch events
This CL removes the CrOS-specific touch screens master switch, and moves the global status of the touch screens to the DeviceDataManager. The touch screens availability will be one of three states NONE, ENABLED, or DISABLED. This CL fixes the use of the #touch-events flag as intended -- to forceand simulate the presence or lack of touch screen devices. R=oshima@chromium.org, sadrul@chromium.org BUG=555390,560892 Review URL: https://codereview.chromium.org/1458343002 Cr-Commit-Position: refs/heads/master@{#362547}
Diffstat (limited to 'ash')
-rw-r--r--ash/wm/system_gesture_event_filter.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/ash/wm/system_gesture_event_filter.cc b/ash/wm/system_gesture_event_filter.cc
index e3e1758..735edfc 100644
--- a/ash/wm/system_gesture_event_filter.cc
+++ b/ash/wm/system_gesture_event_filter.cc
@@ -28,7 +28,9 @@ SystemGestureEventFilter::~SystemGestureEventFilter() {
void SystemGestureEventFilter::OnMouseEvent(ui::MouseEvent* event) {
#if defined(OS_CHROMEOS)
- if (event->type() == ui::ET_MOUSE_PRESSED && ui::IsTouchDevicePresent()) {
+ if (event->type() == ui::ET_MOUSE_PRESSED &&
+ ui::GetTouchScreensAvailability() ==
+ ui::TouchScreensAvailability::ENABLED) {
Shell::GetInstance()->metrics()->RecordUserMetricsAction(UMA_MOUSE_DOWN);
}
#endif