OLD | NEW |
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2013 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 assert(!is_android && !is_ios) | 5 assert(!is_android && !is_ios) |
6 | 6 |
7 source_ids = "//third_party/usb_ids/usb.ids" | 7 source_ids = "//third_party/usb_ids/usb.ids" |
8 generated_ids = "$target_gen_dir/usb_ids_gen.cc" | 8 generated_ids = "$target_gen_dir/usb_ids_gen.cc" |
9 | 9 |
10 source_set("usb") { | 10 source_set("usb") { |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 ] | 44 ] |
45 | 45 |
46 if (is_linux) { | 46 if (is_linux) { |
47 deps += [ "//device/udev_linux" ] | 47 deps += [ "//device/udev_linux" ] |
48 } | 48 } |
49 if (is_chromeos) { | 49 if (is_chromeos) { |
50 deps += [ "//chromeos" ] | 50 deps += [ "//chromeos" ] |
51 } | 51 } |
52 } | 52 } |
53 | 53 |
| 54 source_set("mocks") { |
| 55 testonly = true |
| 56 |
| 57 sources = [ |
| 58 "mock_usb_device.cc", |
| 59 "mock_usb_device.h", |
| 60 "mock_usb_device_handle.cc", |
| 61 "mock_usb_device_handle.h", |
| 62 "mock_usb_service.cc", |
| 63 "mock_usb_service.h", |
| 64 ] |
| 65 |
| 66 deps = [ |
| 67 "//base", |
| 68 "//testing/gmock", |
| 69 ":usb", |
| 70 ] |
| 71 } |
| 72 |
54 action("usb_device_ids") { | 73 action("usb_device_ids") { |
55 script = "//device/usb/tools/usb_ids.py" | 74 script = "//device/usb/tools/usb_ids.py" |
56 inputs = [ | 75 inputs = [ |
57 source_ids, | 76 source_ids, |
58 ] | 77 ] |
59 outputs = [ | 78 outputs = [ |
60 generated_ids, | 79 generated_ids, |
61 ] | 80 ] |
62 args = [ | 81 args = [ |
63 "-i", | 82 "-i", |
64 rebase_path(source_ids, root_build_dir), | 83 rebase_path(source_ids, root_build_dir), |
65 "-o", | 84 "-o", |
66 rebase_path(generated_ids, root_build_dir), | 85 rebase_path(generated_ids, root_build_dir), |
67 ] | 86 ] |
68 | 87 |
69 # Only the device_usb target can depend on us. | 88 # Only the device_usb target can depend on us. |
70 visibility = [ ":usb" ] | 89 visibility = [ ":usb" ] |
71 } | 90 } |
OLD | NEW |