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("//tools/grit/grit_rule.gni")
7 gypi_values = exec_script(
8 "//build/gypi_to_gn.py",
9 [ rebase_path("../chrome_common.gypi") ],
11 [ "../chrome_common.gypi" ])
13 # GYP version: chrome/chrome_resources.gyp:chrome_resources
14 # (generate_common_resources action)
16 source = "common_resources.grd"
17 output_dir = "$root_gen_dir/chrome"
18 output_name = "common_resources"
20 "grit/common_resources.h",
21 "common_resources.pak",
25 # GYP version: chrome/chrome_resources.gyp:chrome_resources
26 # (generate_extensions_api_resources action)
27 grit("extensions_api_resources") {
28 source = "extensions_api_resources.grd"
29 output_dir = "$root_gen_dir/chrome"
31 "grit/extensions_api_resources.h",
32 "extensions_api_resources.pak",
36 # GYP version: chrome/chrome_common.gyp:common
37 static_library("common") {
38 sources = rebase_path(gypi_values.chrome_common_sources, ".", "//chrome")
41 configs += [ "//build/config/compiler:wexit_time_destructors" ]
51 "//chrome/app/theme:theme_resources",
52 "//chrome/common:constants",
53 "//chrome/common/net",
54 "//chrome/common/safe_browsing:proto",
55 "//chrome/installer/util",
56 "//components/cloud_devices/common",
57 "//components/content_settings/core/common",
58 "//components/json_schema",
59 "//components/metrics",
60 "//components/policy:policy_component_common",
61 "//components/translate/core/common",
62 "//components/variations",
63 "//content/public/common",
65 "//extensions:extensions_resources",
66 "//extensions/strings",
71 "//third_party/libxml",
72 "//third_party/sqlite",
73 "//third_party/zlib:zip",
74 "//ui/resources:resources",
80 # Use this Mac file that was filtered out.
81 "chrome_version_info_mac.mm",
86 "//components/visitedlink/common",
87 "//components/autofill/content/common",
88 "//components/autofill/core/common",
89 "//components/password_manager/content/common",
90 "//components/password_manager/core/common",
91 "//components/signin/core/common",
92 "//components/translate/content/common",
95 "//third_party/widevine/cdm:version_h",
99 if (enable_extensions) {
100 sources += rebase_path(
101 gypi_values.chrome_common_extensions_sources,
104 "//device/bluetooth", # TODO(thestig) Still needed? Not in gyp version.
106 "//chrome/common/extensions/api",
107 "//extensions/common",
108 "//extensions/common/api",
112 if (is_win || is_mac) {
113 sources += rebase_path(
114 gypi_values.chrome_common_win_mac_sources,
118 "extensions/api/networking_private/networking_private_crypto_nss.cc",
120 # networking_private_crypto_openssl.cc depends on boringssl.
122 "//third_party/boringssl",
126 "extensions/api/networking_private/networking_private_crypto_openssl.cc",
129 deps += [ "//breakpad:client" ]
132 sources += rebase_path(
133 gypi_values.chrome_common_mac_sources,
139 #'<(DEPTH)/components/nacl.gyp:nacl_common', TODO(GYP)
144 if (printing_mode == 0) {
150 deps += [ "//printing" ]
151 if (printing_mode == 1) {
152 # Full printing support.
153 sources += rebase_path(
154 gypi_values.chrome_common_service_process_sources,
159 if (enable_service_discovery) {
161 "local_discovery/service_discovery_client.cc",
162 "local_discovery/service_discovery_client.h",
167 "local_discovery/service_discovery_client_impl.cc",
168 "local_discovery/service_discovery_client_impl.h",
175 "chrome_version_info_posix.cc",
176 "icon_with_badge_image_source.cc",
177 "media_galleries/metadata_types.h",
178 "spellcheck_common.cc",
182 sources += rebase_path(
183 gypi_values.chrome_common_importer_sources,
188 deps += [ "//third_party/wtl" ]
192 sources += [ "local_discovery/local_discovery_messages.h" ]
197 "chrome_version_info_posix.cc",
200 "//third_party/mach_override",
201 "//third_party/google_toolbox_for_mac",
205 if (enable_remoting) {
206 deps += [ "//remoting/client/plugin" ]
208 if (enable_plugins) {
212 "pepper_permission_util.cc",
213 "pepper_permission_util.h",
216 "//third_party/adobe/flash:flapper_version_h",
219 if (!enable_webrtc) {
220 sources -= [ "media/webrtc_logging_messages.h" ]
222 if (enable_configuration_policy) {
223 deps += [ "//components/policy" ]
226 if (safe_browsing_mode == 1) {
227 defines += [ "FULL_SAFE_BROWSING" ]
228 sources += rebase_path(
229 gypi_values.chrome_common_full_safe_browsing_sources,
232 if (safe_browsing_mode == 2) {
233 defines += [ "MOBILE_SAFE_BROWSING" ]
237 import("//chrome/version.gni")
238 process_version("version") {
239 visibility = [ ":common" ]
240 source = "chrome_version_info_values.h.version"
241 output = "$target_gen_dir/chrome_version_info_values.h"
244 # GN version: chrome/common_constants.gyp:common_constants
245 static_library("constants") {
247 "chrome_constants.cc",
248 "chrome_constants.h",
249 "chrome_icon_resources_win.cc",
250 "chrome_icon_resources_win.h",
253 "chrome_paths_android.cc",
254 "chrome_paths_internal.h",
255 "chrome_paths_linux.cc",
256 "chrome_paths_mac.mm",
257 "chrome_paths_win.cc",
258 "chrome_switches.cc",
262 "net/test_server_locations.cc",
263 "net/test_server_locations.h",
264 "pref_font_script_names-inl.h",
265 "pref_font_webkit_names.h",
268 "widevine_cdm_constants.cc",
269 "widevine_cdm_constants.h",
274 "//base/third_party/dynamic_annotations",
275 "//components/bookmarks/common",
276 "//third_party/widevine/cdm:version_h",
281 #'../components/nacl.gyp:nacl_switches', TODO(GYP)
286 source_set("test_support") {
288 visibility = [ "//chrome/test:test_support" ]
291 "extensions/extension_test_util.cc",
292 "extensions/extension_test_util.h",
301 if (is_win || is_mac) {
303 "media_galleries/picasa_test_util.cc",
304 "media_galleries/picasa_test_util.h",
305 "media_galleries/pmp_test_util.cc",
306 "media_galleries/pmp_test_util.h",