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

Unified Diff: ui/events/devices/device_util_linux.cc

Issue 688163004: Move X11 device processing to worker threads (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix-blocking-touchscreen
Patch Set: Add null Created 6 years, 1 month 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 | « no previous file | ui/events/platform/x11/x11_event_source.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/devices/device_util_linux.cc
diff --git a/ui/events/devices/device_util_linux.cc b/ui/events/devices/device_util_linux.cc
index 89247f110a9e50eacb490f2257f2d539fa624788..8157e1c9781351faff6d6c8024b64d989d3fd5ea 100644
--- a/ui/events/devices/device_util_linux.cc
+++ b/ui/events/devices/device_util_linux.cc
@@ -8,11 +8,16 @@
#include "base/files/file_enumerator.h"
#include "base/files/file_path.h"
+#include "base/message_loop/message_loop.h"
#include "base/strings/string_util.h"
namespace ui {
+// We consider the touchscreen to be internal if it is an I2c device. We search
+// all the dev input nodes registered by I2C devices to see if we can find
+// eventXXX.
bool IsTouchscreenInternal(const base::FilePath& path) {
+ DCHECK(!base::MessageLoopForUI::IsCurrent());
std::string event_node = path.BaseName().value();
if (event_node.empty() || !StartsWithASCII(event_node, "event", false))
return false;
« no previous file with comments | « no previous file | ui/events/platform/x11/x11_event_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698