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("//build/gypi_to_gn.py",
8 [ rebase_path("../chrome_common.gypi") ],
10 [ "../chrome_common.gypi" ])
12 # GYP version: chrome/chrome_resources.gyp:chrome_resources
13 # (generate_common_resources action)
15 source = "common_resources.grd"
16 output_dir = "$root_gen_dir/chrome"
17 output_name = "common_resources"
19 "grit/common_resources.h",
20 "common_resources.pak",
24 # GYP version: chrome/chrome_resources.gyp:chrome_resources
25 # (generate_extensions_api_resources action)
26 if (enable_extensions) {
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",
37 # GYP version: chrome/chrome_common.gyp:common
38 static_library("common") {
39 sources = rebase_path(gypi_values.chrome_common_sources, ".", "//chrome")
42 configs += [ "//build/config/compiler:wexit_time_destructors" ]
52 "//chrome/app/theme:theme_resources",
53 "//chrome/common:constants",
54 "//chrome/common/net",
55 "//chrome/common/safe_browsing:proto",
56 "//chrome/installer/util",
57 "//components/cloud_devices/common",
58 "//components/content_settings/core/common",
59 "//components/json_schema",
60 "//components/metrics",
61 "//components/policy:policy_component_common",
62 "//components/translate/core/common",
63 "//components/variations",
64 "//content/public/common",
66 "//extensions/common:common_constants",
70 "//third_party/libxml",
71 "//third_party/sqlite",
72 "//third_party/zlib:zip",
73 "//ui/resources:resources",
79 # Use this Mac file that was filtered out.
80 "chrome_version_info_mac.mm",
85 "//components/visitedlink/common",
86 "//components/autofill/content/common",
87 "//components/autofill/core/common",
88 "//components/password_manager/content/common",
89 "//components/password_manager/core/common",
90 "//components/signin/core/common",
91 "//components/translate/content/common",
94 "//third_party/widevine/cdm:version_h",
98 if (enable_extensions) {
99 sources += rebase_path(gypi_values.chrome_common_extensions_sources,
104 "//chrome/common/extensions/api",
105 "//extensions/common",
106 "//extensions/common/api",
107 "//extensions:extensions_resources",
108 "//extensions/strings",
113 if (is_win || is_mac) {
115 rebase_path(gypi_values.chrome_common_win_mac_sources, ".", "//chrome")
116 deps += [ "//breakpad:client" ]
118 if (is_win || is_mac || is_chromeos) {
120 sources += rebase_path(
121 gypi_values.chrome_common_networking_private_sources_openssl,
125 # networking_private_crypto_openssl.cc depends on boringssl.
126 deps += [ "//third_party/boringssl" ]
129 rebase_path(gypi_values.chrome_common_networking_private_sources_nss,
136 rebase_path(gypi_values.chrome_common_mac_sources, ".", "//chrome")
141 #'<(DEPTH)/components/nacl.gyp:nacl_common', TODO(GYP)
146 if (enable_basic_printing || enable_print_preview) {
148 "//components/printing/common:printing_common",
151 if (enable_print_preview) {
152 # Full printing support.
153 sources += rebase_path(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",
183 rebase_path(gypi_values.chrome_common_importer_sources, ".", "//chrome")
187 sources -= [ "chrome_version_info_posix.cc" ]
191 deps += [ "//third_party/wtl" ]
195 sources += [ "local_discovery/local_discovery_messages.h" ]
199 sources -= [ "chrome_version_info_posix.cc" ]
201 "//third_party/mach_override",
202 "//third_party/google_toolbox_for_mac",
206 if (enable_plugins) {
211 deps += [ "//third_party/adobe/flash:flapper_version_h" ]
213 if (enable_plugins && enable_extensions) {
215 "pepper_permission_util.cc",
216 "pepper_permission_util.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(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 process_version("make_chrome_version") {
245 source = "chrome_version.cc.version"
246 output = "$target_gen_dir/chrome_version.cc"
249 # GN version: chrome/common_constants.gyp:common_constants
250 static_library("constants") {
252 "chrome_constants.cc",
253 "chrome_constants.h",
254 "chrome_icon_resources_win.cc",
255 "chrome_icon_resources_win.h",
258 "chrome_paths_android.cc",
259 "chrome_paths_internal.h",
260 "chrome_paths_linux.cc",
261 "chrome_paths_mac.mm",
262 "chrome_paths_win.cc",
263 "chrome_switches.cc",
267 "net/test_server_locations.cc",
268 "net/test_server_locations.h",
269 "pref_font_script_names-inl.h",
270 "pref_font_webkit_names.h",
273 "widevine_cdm_constants.cc",
274 "widevine_cdm_constants.h",
276 sources += get_target_outputs(":make_chrome_version")
279 ":make_chrome_version",
281 "//base/third_party/dynamic_annotations",
282 "//components/bookmarks/common",
283 "//third_party/widevine/cdm:version_h",
288 #'../components/nacl.gyp:nacl_switches', TODO(GYP)
293 source_set("test_support") {
295 visibility = [ "//chrome/test:test_support" ]
305 if (is_win || is_mac) {
307 "media_galleries/picasa_test_util.cc",
308 "media_galleries/picasa_test_util.h",
309 "media_galleries/pmp_test_util.cc",
310 "media_galleries/pmp_test_util.h",
314 if (enable_extensions) {
316 "extensions/extension_test_util.cc",
317 "extensions/extension_test_util.h",