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/files/scoped_file.h" | 19 #include "base/files/scoped_file.h" |
20 #include "base/location.h" | 20 #include "base/location.h" |
21 #include "base/macros.h" | 21 #include "base/macros.h" |
22 #include "base/memory/ptr_util.h" | 22 #include "base/memory/ptr_util.h" |
23 #include "base/sequence_checker.h" | 23 #include "base/sequence_checker.h" |
| 24 #include "base/sequenced_task_runner.h" |
24 #include "base/strings/string_number_conversions.h" | 25 #include "base/strings/string_number_conversions.h" |
25 #include "base/strings/string_split.h" | 26 #include "base/strings/string_split.h" |
26 #include "base/task_scheduler/post_task.h" | 27 #include "base/task_scheduler/post_task.h" |
27 #include "base/threading/thread_restrictions.h" | 28 #include "base/threading/thread_restrictions.h" |
28 #include "base/threading/thread_task_runner_handle.h" | 29 #include "base/threading/thread_task_runner_handle.h" |
29 #include "build/build_config.h" | 30 #include "build/build_config.h" |
30 #include "components/device_event_log/device_event_log.h" | 31 #include "components/device_event_log/device_event_log.h" |
31 #include "device/hid/hid_connection_linux.h" | 32 #include "device/hid/hid_connection_linux.h" |
32 #include "device/hid/hid_device_info_linux.h" | 33 #include "device/hid/hid_device_info_linux.h" |
33 #include "device/udev_linux/scoped_udev.h" | 34 #include "device/udev_linux/scoped_udev.h" |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 | 317 |
317 // static | 318 // static |
318 void HidServiceLinux::CreateConnection(std::unique_ptr<ConnectParams> params) { | 319 void HidServiceLinux::CreateConnection(std::unique_ptr<ConnectParams> params) { |
319 DCHECK(params->fd.is_valid()); | 320 DCHECK(params->fd.is_valid()); |
320 params->callback.Run(base::MakeShared<HidConnectionLinux>( | 321 params->callback.Run(base::MakeShared<HidConnectionLinux>( |
321 std::move(params->device_info), std::move(params->fd), | 322 std::move(params->device_info), std::move(params->fd), |
322 std::move(params->blocking_task_runner))); | 323 std::move(params->blocking_task_runner))); |
323 } | 324 } |
324 | 325 |
325 } // namespace device | 326 } // namespace device |
OLD | NEW |