Check USB device path access when prompting users to select a device.
[chromium-blink-merge.git] / chrome / utility / BUILD.gn
blobd67c23850730de6495c0b36aae3784a92910af8c
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
3 # found in the LICENSE file.
5 import("//build/config/crypto.gni")
6 import("//build/config/features.gni")
8 gypi_values = exec_script("//build/gypi_to_gn.py",
9                           [ rebase_path("../chrome_utility.gypi") ],
10                           "scope",
11                           [ "../chrome_utility.gypi" ])
13 static_library("utility") {
14   sources = rebase_path(gypi_values.chrome_utility_sources, ".", "..")
15   defines = []
17   public_deps = []
18   deps = [
19     "//base",
20     "//components/search_engines",
21     "//components/strings",
22     "//components/url_fixer",
23     "//content/public/common",
24     "//content/public/utility",
25     "//media",
26     "//skia",
27     "//third_party/libxml",
28     "//chrome:resources",
29     "//chrome:strings",
30     "//chrome/common",
31   ]
33   if (is_android) {
34     if (use_seccomp_bpf) {
35       deps += [ "//sandbox/linux:seccomp_bpf" ]
36       defines += [ "USE_SECCOMP_BPF" ]
37     }
38   } else {
39     deps += [ "//net:net_utility_services" ]
40     sources +=
41         rebase_path(gypi_values.chrome_utility_importer_sources, ".", "..")
42   }
44   if (enable_extensions) {
45     deps += [
46       "//chrome/common/extensions/api",
47       "//extensions/utility",
48     ]
50     public_deps += [ "//chrome/common/extensions/api" ]
52     sources +=
53         rebase_path(gypi_values.chrome_utility_extensions_sources, ".", "..")
54     sources +=
55         rebase_path(gypi_values.chrome_utility_shared_media_sources, ".", "..")
57     # Prevent wininet from loading in the renderer. http://crbug.com/460679
58     if (is_win) {
59       ldflags = [ "/DELAYLOAD:wininet.dll" ]
60     }
62     if (is_win || is_mac) {
63       sources +=
64           rebase_path(gypi_values.chrome_utility_win_mac_media_gallery_sources,
65                       ".",
66                       "..")
67       deps += [ "//components/wifi" ]
68     } else {
69       sources += [ "image_writer/image_writer_stub.cc" ]
70     }
72     if (is_mac) {
73       sources +=
74           rebase_path(gypi_values.chrome_utility_mac_media_gallery_sources,
75                       ".",
76                       "..")
77     }
79     # Linux should use system libexif
80     if (!is_linux) {
81       # TODO(thestig): Properly support building on Linux and ChromeOS.
82       deps += [ "//third_party/libexif" ]
83     }
84   }
86   if (use_openssl) {
87     if (!is_win && !is_mac && !is_android) {
88       sources -= [ "importer/nss_decryptor.cc" ]
89     }
90   } else {  # !use_openssl
91     if (!is_win && !is_mac) {
92       sources += [
93         "importer/nss_decryptor_system_nss.cc",
94         "importer/nss_decryptor_system_nss.h",
95       ]
96       deps += [
97         "//crypto",
98         "//crypto:platform",
99       ]
100     }
101   }
103   if (!enable_print_preview) {
104     sources -= [
105       "printing_handler.cc",
106       "printing_handler.h",
107     ]
108   }
110   if (!enable_mdns) {
111     sources -= [
112       "local_discovery/service_discovery_message_handler.cc",
113       "local_discovery/service_discovery_message_handler.h",
114     ]
115   }
117   if (safe_browsing_mode == 1) {
118     defines += [ "FULL_SAFE_BROWSING" ]
119   }