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

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: Fix updating cursor on enter notify. 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
« no previous file with comments | « ui/events/x/device_data_manager_x11.cc ('k') | ui/events/x/events_x_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/x/events_x.cc
diff --git a/ui/events/x/events_x.cc b/ui/events/x/events_x.cc
index 69cf733e003a987b795a572aa65d6b81b891b9d5..5216f31effff845645644084a7ece86526a2f78f 100644
--- a/ui/events/x/events_x.cc
+++ b/ui/events/x/events_x.cc
@@ -271,6 +271,15 @@ 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.
+ // NOTE: During some events unittests there is no device data manager.
+ if (DeviceDataManager::HasInstance() &&
+ static_cast<DeviceDataManagerX11*>(DeviceDataManager::GetInstance())->
+ IsEventBlocked(native_event)) {
+ return ET_UNKNOWN;
+ }
+
switch (native_event->type) {
case KeyPress:
return ET_KEY_PRESSED;
« no previous file with comments | « ui/events/x/device_data_manager_x11.cc ('k') | ui/events/x/events_x_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698