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

Unified Diff: ui/events/x/events_x.cc

Issue 313913004: Block internal PlatformEvents before they are dispatched in touchview. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Block events from disabled devices through DeviceDataManager. Created 6 years, 6 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
Index: ui/events/x/events_x.cc
diff --git a/ui/events/x/events_x.cc b/ui/events/x/events_x.cc
index 9d6b15a2eca3a0dc71a833999707b1385c79e011..e9198083a831c6b994c119c0d9de574862aafd51 100644
--- a/ui/events/x/events_x.cc
+++ b/ui/events/x/events_x.cc
@@ -268,6 +268,11 @@ void UpdateDeviceList() {
}
EventType EventTypeFromNative(const base::NativeEvent& native_event) {
+ // Allow the DeviceDataManager to block the event. If blocked return
+ // ET_UNKNOWN as the type so this event will not be further processed.
+ if (DeviceDataManager::GetInstance()->EventBlocked(native_event))
+ return ET_UNKNOWN;
+
switch (native_event->type) {
case KeyPress:
return ET_KEY_PRESSED;

Powered by Google App Engine
This is Rietveld 408576698