summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAhmed Fakhry <afakhry@google.com>2015-12-10 14:53:04 -0800
committerAhmed Fakhry <afakhry@google.com>2015-12-10 22:54:33 +0000
commitd87afba2d5c9a462654145b6b4f0f21864f459a8 (patch)
treec8a8415cdcf75a49cf25d339900ae5b6cf43674f
parenta59a546f7b3fcf42cdd9e44b0e732044c0b15537 (diff)
downloadchromium_src-d87afba2d5c9a462654145b6b4f0f21864f459a8.zip
chromium_src-d87afba2d5c9a462654145b6b4f0f21864f459a8.tar.gz
chromium_src-d87afba2d5c9a462654145b6b4f0f21864f459a8.tar.bz2
[Merge into M48]: 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. TBR=oshima@chromium.org, sadrul@chromium.org,sky@chromium.org BUG=555390,560892,565581,562315 Review URL: https://codereview.chromium.org/1458343002 Cr-Commit-Position: refs/heads/master@{#362547} (cherry picked from commit 661e756abf12e911d936464034e93ca7690558ae) Review URL: https://codereview.chromium.org/1517063002 . Cr-Commit-Position: refs/branch-heads/2564@{#315} Cr-Branched-From: 1283eca15bd9f772387f75241576cde7bdec7f54-refs/heads/master@{#359700}
-rw-r--r--ash/wm/system_gesture_event_filter.cc4
-rw-r--r--chrome/browser/chromeos/system/input_device_settings_impl_ozone.cc2
-rw-r--r--chrome/browser/chromeos/system/input_device_settings_impl_x11.cc3
-rw-r--r--chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc6
-rw-r--r--chrome/browser/ui/browser.cc3
-rw-r--r--content/browser/renderer_host/render_view_host_impl.cc3
-rw-r--r--ui/base/touch/touch_device.cc4
-rw-r--r--ui/base/touch/touch_device.h9
-rw-r--r--ui/base/touch/touch_device_android.cc4
-rw-r--r--ui/base/touch/touch_device_ios.cc4
-rw-r--r--ui/base/touch/touch_device_linux.cc15
-rw-r--r--ui/base/touch/touch_device_win.cc11
-rw-r--r--ui/base/touch/touch_enabled.cc28
-rw-r--r--ui/events/base_event_utils.cc15
-rw-r--r--ui/events/base_event_utils.h7
-rw-r--r--ui/events/devices/device_data_manager.cc8
-rw-r--r--ui/events/devices/device_data_manager.h5
-rw-r--r--ui/events/devices/x11/touch_factory_x11.cc41
-rw-r--r--ui/events/devices/x11/touch_factory_x11.h11
-rw-r--r--ui/events/ozone/evdev/input_controller_evdev.cc2
20 files changed, 109 insertions, 76 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
diff --git a/chrome/browser/chromeos/system/input_device_settings_impl_ozone.cc b/chrome/browser/chromeos/system/input_device_settings_impl_ozone.cc
index b32f5f0..3a3d98e 100644
--- a/chrome/browser/chromeos/system/input_device_settings_impl_ozone.cc
+++ b/chrome/browser/chromeos/system/input_device_settings_impl_ozone.cc
@@ -5,7 +5,6 @@
#include "chrome/browser/chromeos/system/input_device_settings.h"
#include "content/public/browser/browser_thread.h"
-#include "ui/events/base_event_utils.h"
#include "ui/ozone/public/input_controller.h"
#include "ui/ozone/public/ozone_platform.h"
@@ -137,7 +136,6 @@ void InputDeviceSettingsImplOzone::SetInternalTouchpadEnabled(bool enabled) {
void InputDeviceSettingsImplOzone::SetTouchscreensEnabled(bool enabled) {
input_controller_->SetTouchscreensEnabled(enabled);
- ui::SetTouchEventsCrOsMasterSwitch(enabled);
}
} // namespace
diff --git a/chrome/browser/chromeos/system/input_device_settings_impl_x11.cc b/chrome/browser/chromeos/system/input_device_settings_impl_x11.cc
index fb5393c..ea870bd 100644
--- a/chrome/browser/chromeos/system/input_device_settings_impl_x11.cc
+++ b/chrome/browser/chromeos/system/input_device_settings_impl_x11.cc
@@ -25,6 +25,7 @@
#include "ui/events/base_event_utils.h"
#include "ui/events/devices/x11/device_data_manager_x11.h"
#include "ui/events/devices/x11/device_list_cache_x11.h"
+#include "ui/events/devices/x11/touch_factory_x11.h"
#include "ui/gfx/x/x11_types.h"
namespace chromeos {
@@ -294,7 +295,7 @@ void InputDeviceSettingsImplX11::SetInternalTouchpadEnabled(bool enabled) {
}
void InputDeviceSettingsImplX11::SetTouchscreensEnabled(bool enabled) {
- ui::SetTouchEventsCrOsMasterSwitch(enabled);
+ ui::TouchFactory::GetInstance()->SetTouchscreensEnabled(enabled);
}
void InputDeviceSettingsImplX11::GenerateTouchpadArguments(
diff --git a/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc b/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc
index f61e22a..acd878f 100644
--- a/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc
+++ b/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc
@@ -239,8 +239,10 @@ void RecordTouchEventState() {
touch_enabled_switch == switches::kTouchEventsEnabled) {
state = UMA_TOUCH_EVENTS_ENABLED;
} else if (touch_enabled_switch == switches::kTouchEventsAuto) {
- state = ui::IsTouchDevicePresent() ?
- UMA_TOUCH_EVENTS_AUTO_ENABLED : UMA_TOUCH_EVENTS_AUTO_DISABLED;
+ state = (ui::GetTouchScreensAvailability() ==
+ ui::TouchScreensAvailability::ENABLED)
+ ? UMA_TOUCH_EVENTS_AUTO_ENABLED
+ : UMA_TOUCH_EVENTS_AUTO_DISABLED;
} else if (touch_enabled_switch == switches::kTouchEventsDisabled) {
state = UMA_TOUCH_EVENTS_DISABLED;
} else {
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 4db78df..0fa7bd1 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -1184,7 +1184,8 @@ bool Browser::CanOverscrollContent() const {
// horizontal scrolling. We are purposefully biased towards "no" here,
// so that we don't waste resources capturing screenshots for horizontal
// overscroll navigation unnecessarily.
- bool allow_overscroll = ui::IsTouchDevicePresent();
+ bool allow_overscroll = ui::GetTouchScreensAvailability() ==
+ ui::TouchScreensAvailability::ENABLED;
#elif defined(USE_AURA)
bool allow_overscroll = true;
#else
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index e49864b..3b99a41 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -467,7 +467,8 @@ WebPreferences RenderViewHostImpl::ComputeWebkitPrefs() {
prefs.touch_enabled = ui::AreTouchEventsEnabled();
prefs.device_supports_touch = prefs.touch_enabled &&
- ui::IsTouchDevicePresent();
+ ui::GetTouchScreensAvailability() ==
+ ui::TouchScreensAvailability::ENABLED;
prefs.available_pointer_types = ui::GetAvailablePointerTypes();
prefs.primary_pointer_type = ui::GetPrimaryPointerType();
prefs.available_hover_types = ui::GetAvailableHoverTypes();
diff --git a/ui/base/touch/touch_device.cc b/ui/base/touch/touch_device.cc
index 8aa6340..5b02be2 100644
--- a/ui/base/touch/touch_device.cc
+++ b/ui/base/touch/touch_device.cc
@@ -8,8 +8,8 @@ namespace ui {
// Platforms supporting touch link in an alternate implementation of this
// method.
-bool IsTouchDevicePresent() {
- return false;
+TouchScreensAvailability GetTouchScreensAvailability() {
+ return TouchScreensAvailability::NONE;
}
int MaxTouchPoints() {
diff --git a/ui/base/touch/touch_device.h b/ui/base/touch/touch_device.h
index d87b645..5ea6726 100644
--- a/ui/base/touch/touch_device.h
+++ b/ui/base/touch/touch_device.h
@@ -16,8 +16,13 @@
namespace ui {
-// Returns true if a touch device is available.
-UI_BASE_EXPORT bool IsTouchDevicePresent();
+enum class TouchScreensAvailability {
+ NONE, // No touch screens are present.
+ ENABLED, // Touch screens are present and enabled.
+ DISABLED, // Touch screens are present and disabled.
+};
+
+UI_BASE_EXPORT TouchScreensAvailability GetTouchScreensAvailability();
// Returns the maximum number of simultaneous touch contacts supported
// by the device. In the case of devices with multiple digitizers (e.g.
diff --git a/ui/base/touch/touch_device_android.cc b/ui/base/touch/touch_device_android.cc
index 5754c65..73c48c0 100644
--- a/ui/base/touch/touch_device_android.cc
+++ b/ui/base/touch/touch_device_android.cc
@@ -9,8 +9,8 @@
namespace ui {
-bool IsTouchDevicePresent() {
- return true;
+TouchScreensAvailability GetTouchScreensAvailability() {
+ return TouchScreensAvailability::ENABLED;
}
int MaxTouchPoints() {
diff --git a/ui/base/touch/touch_device_ios.cc b/ui/base/touch/touch_device_ios.cc
index 9f4c712..18ffc74 100644
--- a/ui/base/touch/touch_device_ios.cc
+++ b/ui/base/touch/touch_device_ios.cc
@@ -6,8 +6,8 @@
namespace ui {
-bool IsTouchDevicePresent() {
- return true;
+TouchScreensAvailability GetTouchScreensAvailability() {
+ return TouchScreensAvailability::ENABLED;
}
} // namespace ui
diff --git a/ui/base/touch/touch_device_linux.cc b/ui/base/touch/touch_device_linux.cc
index 2e29c1d..0bc8970 100644
--- a/ui/base/touch/touch_device_linux.cc
+++ b/ui/base/touch/touch_device_linux.cc
@@ -9,8 +9,21 @@
namespace ui {
+namespace {
+
bool IsTouchDevicePresent() {
- return ui::DeviceDataManager::GetInstance()->touchscreen_devices().size() > 0;
+ return !DeviceDataManager::GetInstance()->touchscreen_devices().empty();
+}
+
+} // namespace
+
+TouchScreensAvailability GetTouchScreensAvailability() {
+ if (!IsTouchDevicePresent())
+ return TouchScreensAvailability::NONE;
+
+ return DeviceDataManager::GetInstance()->AreTouchscreensEnabled() ?
+ TouchScreensAvailability::ENABLED :
+ TouchScreensAvailability::DISABLED;
}
int MaxTouchPoints() {
diff --git a/ui/base/touch/touch_device_win.cc b/ui/base/touch/touch_device_win.cc
index 04434fc..2655486 100644
--- a/ui/base/touch/touch_device_win.cc
+++ b/ui/base/touch/touch_device_win.cc
@@ -9,12 +9,23 @@
namespace ui {
+namespace {
+
bool IsTouchDevicePresent() {
int value = GetSystemMetrics(SM_DIGITIZER);
return (value & NID_READY) &&
((value & NID_INTEGRATED_TOUCH) || (value & NID_EXTERNAL_TOUCH));
}
+} // namespace
+
+TouchScreensAvailability GetTouchScreensAvailability() {
+ if (!IsTouchDevicePresent())
+ return TouchScreensAvailability::NONE;
+
+ return TouchScreensAvailability::ENABLED;
+}
+
int MaxTouchPoints() {
if (!IsTouchDevicePresent())
return 0;
diff --git a/ui/base/touch/touch_enabled.cc b/ui/base/touch/touch_enabled.cc
index 492588a..4992f2f 100644
--- a/ui/base/touch/touch_enabled.cc
+++ b/ui/base/touch/touch_enabled.cc
@@ -15,7 +15,13 @@ namespace ui {
namespace {
-bool ComputeTouchStatus() {
+enum class TouchEventsStatus {
+ AUTO,
+ DISABLED,
+ ENABLED,
+};
+
+TouchEventsStatus ComputeTouchFlagStatus() {
auto* command_line = base::CommandLine::ForCurrentProcess();
const std::string touch_enabled_switch =
command_line->HasSwitch(switches::kTouchEvents) ?
@@ -24,27 +30,29 @@ bool ComputeTouchStatus() {
if (touch_enabled_switch.empty() ||
touch_enabled_switch == switches::kTouchEventsEnabled) {
- return true;
+ return TouchEventsStatus::ENABLED;
}
if (touch_enabled_switch == switches::kTouchEventsAuto)
- return IsTouchDevicePresent();
+ return TouchEventsStatus::AUTO;
DLOG_IF(ERROR, touch_enabled_switch != switches::kTouchEventsDisabled) <<
"Invalid --touch-events option: " << touch_enabled_switch;
- return false;
+ return TouchEventsStatus::DISABLED;
}
} // namespace
bool AreTouchEventsEnabled() {
- static bool touch_status = ComputeTouchStatus();
+ static TouchEventsStatus touch_flag_status = ComputeTouchFlagStatus();
+
+ // The #touch-events flag is used to force and simulate the presence or
+ // absence of touch devices. Only if the flag is set to AUTO, we need to check
+ // for the actual availability of touch devices.
+ if (touch_flag_status == TouchEventsStatus::AUTO)
+ return GetTouchScreensAvailability() == TouchScreensAvailability::ENABLED;
-#if defined(OS_CHROMEOS)
- return touch_status && GetTouchEventsCrOsMasterSwitch();
-#else
- return touch_status;
-#endif // !defined(OS_CHROMEOS)
+ return touch_flag_status == TouchEventsStatus::ENABLED;
}
} // namespace ui
diff --git a/ui/events/base_event_utils.cc b/ui/events/base_event_utils.cc
index 846b6df..4551695 100644
--- a/ui/events/base_event_utils.cc
+++ b/ui/events/base_event_utils.cc
@@ -15,9 +15,6 @@ namespace ui {
namespace {
#if defined(OS_CHROMEOS)
-// Determines whether touch events are enabled or disabled on ChromeOS only.
-bool touch_events_enabled = true;
-
const int kSystemKeyModifierMask = EF_ALT_DOWN | EF_COMMAND_DOWN;
#else
const int kSystemKeyModifierMask = EF_ALT_DOWN;
@@ -44,17 +41,5 @@ bool IsSystemKeyModifier(int flags) {
(EF_ALTGR_DOWN & flags) == 0;
}
-#if defined(OS_CHROMEOS)
-
-void SetTouchEventsCrOsMasterSwitch(bool enabled) {
- touch_events_enabled = enabled;
-}
-
-bool GetTouchEventsCrOsMasterSwitch() {
- return touch_events_enabled;
-}
-
-#endif // defined(OS_CHROMEOS)
-
} // namespace ui
diff --git a/ui/events/base_event_utils.h b/ui/events/base_event_utils.h
index ef02739..c353c61 100644
--- a/ui/events/base_event_utils.h
+++ b/ui/events/base_event_utils.h
@@ -17,13 +17,6 @@ EVENTS_BASE_EXPORT uint32 GetNextTouchEventId();
// Checks if |flags| contains system key modifiers.
EVENTS_BASE_EXPORT bool IsSystemKeyModifier(int flags);
-#if defined(OS_CHROMEOS)
-// On ChromeOS, touch events can be turned off completely using a debug
-// accelerator using the following functions.
-EVENTS_BASE_EXPORT void SetTouchEventsCrOsMasterSwitch(bool enabled);
-EVENTS_BASE_EXPORT bool GetTouchEventsCrOsMasterSwitch();
-#endif // defined(OS_CHROMEOS)
-
} // namespace ui
#endif // UI_EVENTS_BASE_EVENT_UTILS_H_
diff --git a/ui/events/devices/device_data_manager.cc b/ui/events/devices/device_data_manager.cc
index 8f71164..00bd1d8 100644
--- a/ui/events/devices/device_data_manager.cc
+++ b/ui/events/devices/device_data_manager.cc
@@ -213,4 +213,12 @@ void DeviceDataManager::RemoveObserver(InputDeviceEventObserver* observer) {
observers_.RemoveObserver(observer);
}
+void DeviceDataManager::SetTouchscreensEnabled(bool enabled) {
+ touch_screens_enabled_ = enabled;
+}
+
+bool DeviceDataManager::AreTouchscreensEnabled() const {
+ return touch_screens_enabled_;
+}
+
} // namespace ui
diff --git a/ui/events/devices/device_data_manager.h b/ui/events/devices/device_data_manager.h
index f3782eb..98ed2bd 100644
--- a/ui/events/devices/device_data_manager.h
+++ b/ui/events/devices/device_data_manager.h
@@ -63,6 +63,9 @@ class EVENTS_DEVICES_EXPORT DeviceDataManager
void AddObserver(InputDeviceEventObserver* observer);
void RemoveObserver(InputDeviceEventObserver* observer);
+ void SetTouchscreensEnabled(bool enabled);
+ bool AreTouchscreensEnabled() const;
+
protected:
DeviceDataManager();
@@ -109,6 +112,8 @@ class EVENTS_DEVICES_EXPORT DeviceDataManager
base::ObserverList<InputDeviceEventObserver> observers_;
+ bool touch_screens_enabled_ = true;
+
DISALLOW_COPY_AND_ASSIGN(DeviceDataManager);
};
diff --git a/ui/events/devices/x11/touch_factory_x11.cc b/ui/events/devices/x11/touch_factory_x11.cc
index 6718550..42d5771 100644
--- a/ui/events/devices/x11/touch_factory_x11.cc
+++ b/ui/events/devices/x11/touch_factory_x11.cc
@@ -45,7 +45,8 @@ TouchFactory::TouchFactory()
touch_device_list_(),
virtual_core_keyboard_device_(-1),
id_generator_(0),
- touch_events_disabled_(IsTouchEventsFlagDisabled()) {
+ touch_events_flag_disabled_(IsTouchEventsFlagDisabled()),
+ touch_screens_enabled_(true) {
if (!DeviceDataManagerX11::GetInstance()->IsXInput2Available())
return;
@@ -157,12 +158,8 @@ bool TouchFactory::ShouldProcessXI2Event(XEvent* xev) {
XIEvent* event = static_cast<XIEvent*>(xev->xcookie.data);
XIDeviceEvent* xiev = reinterpret_cast<XIDeviceEvent*>(event);
-#if defined(OS_CHROMEOS)
- const bool is_touch_disabled = touch_events_disabled_ &&
- !GetTouchEventsCrOsMasterSwitch();
-#else
- const bool is_touch_disabled = touch_events_disabled_;
-#endif // defined(OS_CHROMEOS)
+ const bool is_touch_disabled =
+ touch_events_flag_disabled_ && !touch_screens_enabled_;
if (event->evtype == XI_TouchBegin ||
event->evtype == XI_TouchUpdate ||
@@ -287,14 +284,9 @@ void TouchFactory::ReleaseSlotForTrackingID(uint32 tracking_id) {
}
bool TouchFactory::IsTouchDevicePresent() {
-#if defined(OS_CHROMEOS)
- const bool is_touch_disabled = touch_events_disabled_ &&
- !GetTouchEventsCrOsMasterSwitch();
-#else
- const bool is_touch_disabled = touch_events_disabled_;
-#endif // defined(OS_CHROMEOS)
-
- return !is_touch_disabled && touch_device_lookup_.any();
+ return !touch_events_flag_disabled_ &&
+ touch_screens_enabled_ &&
+ touch_device_lookup_.any();
}
void TouchFactory::ResetForTest() {
@@ -303,11 +295,8 @@ void TouchFactory::ResetForTest() {
touch_device_list_.clear();
touchscreen_ids_.clear();
id_generator_.ResetForTest();
- touch_events_disabled_ = false;
-
-#if defined(OS_CHROMEOS)
- SetTouchEventsCrOsMasterSwitch(true);
-#endif // defined(OS_CHROMEOS)
+ touch_events_flag_disabled_ = false;
+ SetTouchscreensEnabled(true);
}
void TouchFactory::SetTouchDeviceForTest(
@@ -320,11 +309,8 @@ void TouchFactory::SetTouchDeviceForTest(
touch_device_lookup_[*iter] = true;
touch_device_list_[*iter] = true;
}
- touch_events_disabled_ = false;
-
-#if defined(OS_CHROMEOS)
- SetTouchEventsCrOsMasterSwitch(true);
-#endif // defined(OS_CHROMEOS)
+ touch_events_flag_disabled_ = false;
+ SetTouchscreensEnabled(true);
}
void TouchFactory::SetPointerDeviceForTest(
@@ -336,6 +322,11 @@ void TouchFactory::SetPointerDeviceForTest(
}
}
+void TouchFactory::SetTouchscreensEnabled(bool enabled) {
+ touch_screens_enabled_ = enabled;
+ DeviceDataManager::GetInstance()->SetTouchscreensEnabled(enabled);
+}
+
void TouchFactory::CacheTouchscreenIds(int device_id) {
if (!DeviceDataManager::HasInstance())
return;
diff --git a/ui/events/devices/x11/touch_factory_x11.h b/ui/events/devices/x11/touch_factory_x11.h
index 1f113ea..6a7e28a 100644
--- a/ui/events/devices/x11/touch_factory_x11.h
+++ b/ui/events/devices/x11/touch_factory_x11.h
@@ -97,6 +97,9 @@ class EVENTS_DEVICES_EXPORT TouchFactory {
// X server.
void SetPointerDeviceForTest(const std::vector<int>& devices);
+ // Sets the status of the touch screens to |enabled|.
+ void SetTouchscreensEnabled(bool enabled);
+
private:
// Requirement for Singleton
friend struct base::DefaultSingletonTraits<TouchFactory>;
@@ -137,8 +140,12 @@ class EVENTS_DEVICES_EXPORT TouchFactory {
// Associate each device ID with its master device ID.
std::map<int, int> device_master_id_list_;
- // Indicates whether touch events are explicitly disabled.
- bool touch_events_disabled_;
+ // Indicates whether touch events are explicitly disabled by the flag
+ // #touch-events.
+ bool touch_events_flag_disabled_;
+
+ // The status of the touch screens devices themselves.
+ bool touch_screens_enabled_;
DISALLOW_COPY_AND_ASSIGN(TouchFactory);
};
diff --git a/ui/events/ozone/evdev/input_controller_evdev.cc b/ui/events/ozone/evdev/input_controller_evdev.cc
index 4246096..ed703c4 100644
--- a/ui/events/ozone/evdev/input_controller_evdev.cc
+++ b/ui/events/ozone/evdev/input_controller_evdev.cc
@@ -8,6 +8,7 @@
#include <linux/input.h>
#include "base/thread_task_runner_handle.h"
+#include "ui/events/devices/device_data_manager.h"
#include "ui/events/ozone/evdev/input_device_factory_evdev_proxy.h"
#include "ui/events/ozone/evdev/keyboard_evdev.h"
#include "ui/events/ozone/evdev/mouse_button_map_evdev.h"
@@ -98,6 +99,7 @@ bool InputControllerEvdev::IsInternalTouchpadEnabled() const {
void InputControllerEvdev::SetTouchscreensEnabled(bool enabled) {
input_device_settings_.enable_touch_screens = enabled;
+ ui::DeviceDataManager::GetInstance()->SetTouchscreensEnabled(enabled);
ScheduleUpdateDeviceSettings();
}