Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / device / usb / BUILD.gn
blob4a5caff2b815c7e3a320e4b473734e76b1820520
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
3 # found in the LICENSE file.
5 assert(!is_android && !is_ios)
7 source_ids = "//third_party/usb_ids/usb.ids"
8 generated_ids = "$target_gen_dir/usb_ids_gen.cc"
10 source_set("usb") {
11   sources = [
12     "usb_context.cc",
13     "usb_context.h",
14     "usb_descriptors.cc",
15     "usb_descriptors.h",
16     "usb_device.cc",
17     "usb_device.h",
18     "usb_device_filter.cc",
19     "usb_device_filter.h",
20     "usb_device_handle.h",
21     "usb_device_handle_impl.cc",
22     "usb_device_handle_impl.h",
23     "usb_device_impl.cc",
24     "usb_device_impl.h",
25     "usb_error.cc",
26     "usb_error.h",
27     "usb_ids.cc",
28     "usb_ids.h",
29     "usb_service.cc",
30     "usb_service.h",
31     "usb_service_impl.cc",
32     "usb_service_impl.h",
33     generated_ids,
34   ]
36   deps = [
37     ":usb_device_ids",
38     "//base",
39     "//base/third_party/dynamic_annotations",
40     "//components/device_event_log",
41     "//device/core",
42     "//net",
43     "//third_party/libusb",
44   ]
46   if (is_linux) {
47     deps += [ "//device/udev_linux" ]
48   }
49   if (is_chromeos) {
50     deps += [
51       "//chromeos",
52       "//dbus",
53     ]
54   }
57 source_set("mocks") {
58   testonly = true
60   sources = [
61     "mock_usb_device.cc",
62     "mock_usb_device.h",
63     "mock_usb_device_handle.cc",
64     "mock_usb_device_handle.h",
65     "mock_usb_service.cc",
66     "mock_usb_service.h",
67   ]
69   deps = [
70     "//base",
71     "//testing/gmock",
72     ":usb",
73   ]
76 action("usb_device_ids") {
77   script = "//device/usb/tools/usb_ids.py"
78   inputs = [
79     source_ids,
80   ]
81   outputs = [
82     generated_ids,
83   ]
84   args = [
85     "-i",
86     rebase_path(source_ids, root_build_dir),
87     "-o",
88     rebase_path(generated_ids, root_build_dir),
89   ]
91   # Only the device_usb target can depend on us.
92   visibility = [ ":usb" ]