OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "device/hid/hid_service_linux.h" | 5 #include "device/hid/hid_service_linux.h" |
6 | 6 |
7 #include <fcntl.h> | 7 #include <fcntl.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <limits> | 10 #include <limits> |
11 #include <memory> | 11 #include <memory> |
12 #include <string> | 12 #include <string> |
13 #include <utility> | 13 #include <utility> |
14 | 14 |
15 #include "base/bind.h" | 15 #include "base/bind.h" |
16 #include "base/files/file.h" | 16 #include "base/files/file.h" |
17 #include "base/files/file_path.h" | 17 #include "base/files/file_path.h" |
18 #include "base/files/file_util.h" | 18 #include "base/files/file_util.h" |
19 #include "base/location.h" | 19 #include "base/location.h" |
20 #include "base/macros.h" | 20 #include "base/macros.h" |
21 #include "base/scoped_observer.h" | 21 #include "base/scoped_observer.h" |
22 #include "base/strings/string_number_conversions.h" | 22 #include "base/strings/string_number_conversions.h" |
23 #include "base/strings/string_split.h" | 23 #include "base/strings/string_split.h" |
24 #include "base/thread_task_runner_handle.h" | |
25 #include "base/threading/thread_restrictions.h" | 24 #include "base/threading/thread_restrictions.h" |
| 25 #include "base/threading/thread_task_runner_handle.h" |
26 #include "build/build_config.h" | 26 #include "build/build_config.h" |
27 #include "components/device_event_log/device_event_log.h" | 27 #include "components/device_event_log/device_event_log.h" |
28 #include "device/hid/device_monitor_linux.h" | 28 #include "device/hid/device_monitor_linux.h" |
29 #include "device/hid/hid_connection_linux.h" | 29 #include "device/hid/hid_connection_linux.h" |
30 #include "device/hid/hid_device_info_linux.h" | 30 #include "device/hid/hid_device_info_linux.h" |
31 #include "device/udev_linux/scoped_udev.h" | 31 #include "device/udev_linux/scoped_udev.h" |
32 | 32 |
33 #if defined(OS_CHROMEOS) | 33 #if defined(OS_CHROMEOS) |
34 #include "base/sys_info.h" | 34 #include "base/sys_info.h" |
35 #include "chromeos/dbus/dbus_thread_manager.h" | 35 #include "chromeos/dbus/dbus_thread_manager.h" |
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 | 344 |
345 // static | 345 // static |
346 void HidServiceLinux::CreateConnection(std::unique_ptr<ConnectParams> params) { | 346 void HidServiceLinux::CreateConnection(std::unique_ptr<ConnectParams> params) { |
347 DCHECK(params->device_file.IsValid()); | 347 DCHECK(params->device_file.IsValid()); |
348 params->callback.Run(make_scoped_refptr(new HidConnectionLinux( | 348 params->callback.Run(make_scoped_refptr(new HidConnectionLinux( |
349 params->device_info, std::move(params->device_file), | 349 params->device_info, std::move(params->device_file), |
350 params->file_task_runner))); | 350 params->file_task_runner))); |
351 } | 351 } |
352 | 352 |
353 } // namespace device | 353 } // namespace device |
OLD | NEW |