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/threading/thread_restrictions.h" | 24 #include "base/threading/thread_restrictions.h" |
25 #include "base/threading/thread_task_runner_handle.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/core/device_monitor_linux.h" | 28 #include "device/base/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" |
36 #include "chromeos/dbus/permission_broker_client.h" | 36 #include "chromeos/dbus/permission_broker_client.h" |
37 #endif // defined(OS_CHROMEOS) | 37 #endif // defined(OS_CHROMEOS) |
38 | 38 |
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 | 326 |
327 // static | 327 // static |
328 void HidServiceLinux::CreateConnection(std::unique_ptr<ConnectParams> params) { | 328 void HidServiceLinux::CreateConnection(std::unique_ptr<ConnectParams> params) { |
329 DCHECK(params->device_file.IsValid()); | 329 DCHECK(params->device_file.IsValid()); |
330 params->callback.Run(make_scoped_refptr(new HidConnectionLinux( | 330 params->callback.Run(make_scoped_refptr(new HidConnectionLinux( |
331 params->device_info, std::move(params->device_file), | 331 params->device_info, std::move(params->device_file), |
332 params->file_task_runner))); | 332 params->file_task_runner))); |
333 } | 333 } |
334 | 334 |
335 } // namespace device | 335 } // namespace device |
OLD | NEW |