Index: ui/events/device_util_linux.cc |
diff --git a/ui/events/device_util_linux.cc b/ui/events/device_util_linux.cc |
deleted file mode 100644 |
index b00158f66d1fe8fde2d97186f99f6f1d92c131f6..0000000000000000000000000000000000000000 |
--- a/ui/events/device_util_linux.cc |
+++ /dev/null |
@@ -1,46 +0,0 @@ |
-// Copyright 2014 The Chromium Authors. All rights reserved. |
-// Use of this source code is governed by a BSD-style license that can be |
-// found in the LICENSE file. |
- |
-#include "ui/events/device_util_linux.h" |
- |
-#include <string> |
- |
-#include "base/files/file_enumerator.h" |
-#include "base/files/file_path.h" |
-#include "base/strings/string_util.h" |
- |
-namespace ui { |
- |
-bool IsTouchscreenInternal(const base::FilePath& path) { |
- std::string event_node = path.BaseName().value(); |
- if (event_node.empty() || !StartsWithASCII(event_node, "event", false)) |
- return false; |
- |
- // Extract id "XXX" from "eventXXX" |
- std::string event_node_id = event_node.substr(5); |
- |
- // I2C input device registers its dev input node at |
- // /sys/bus/i2c/devices/*/input/inputXXX/eventXXX |
- base::FileEnumerator i2c_enum( |
- base::FilePath(FILE_PATH_LITERAL("/sys/bus/i2c/devices/")), |
- false, |
- base::FileEnumerator::DIRECTORIES); |
- for (base::FilePath i2c_name = i2c_enum.Next(); !i2c_name.empty(); |
- i2c_name = i2c_enum.Next()) { |
- base::FileEnumerator input_enum( |
- i2c_name.Append(FILE_PATH_LITERAL("input")), |
- false, |
- base::FileEnumerator::DIRECTORIES, |
- FILE_PATH_LITERAL("input*")); |
- for (base::FilePath input = input_enum.Next(); !input.empty(); |
- input = input_enum.Next()) { |
- if (input.BaseName().value().substr(5) == event_node_id) |
- return true; |
- } |
- } |
- |
- return false; |
-} |
- |
-} // namespace |