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"
18 "grit/common_resources.h",
19 "common_resources.pak",
23 # GYP version: chrome/chrome_resources.gyp:chrome_resources
24 # (generate_extensions_api_resources action)
25 grit("extensions_api_resources") {
26 source = "extensions_api_resources.grd"
28 "grit/extensions_api_resources.h",
29 "extensions_api_resources.pak",
33 # GYP version: chrome/chrome_common.gyp:common
34 static_library("common") {
35 sources = rebase_path(gypi_values.chrome_common_sources, ".", "//chrome")
38 configs += [ "//build/config/compiler:wexit_time_destructors" ]
48 "//chrome/app/theme:theme_resources",
49 "//chrome/common:constants",
50 "//chrome/common/net",
51 "//chrome/common/safe_browsing:proto",
52 "//components/cloud_devices/common",
53 "//components/content_settings/core/common",
54 "//components/json_schema",
55 "//components/metrics",
56 "//components/policy:policy_component_common",
57 "//components/translate/core/common",
58 "//components/variations",
59 "//content/public/common",
61 "//extensions:extensions_resources",
62 "//extensions/strings",
66 "//third_party/libxml",
67 "//third_party/sqlite",
68 "//third_party/zlib:zip",
69 "//ui/resources:resources",
71 #":installer_util", TODO(GYP)
72 #"//media/cast/cast.gyp:cast_transport", TODO(GYP)
77 # Use this Mac file that was filtered out.
78 "chrome_version_info_mac.mm",
83 "//chrome/common/extensions/api",
84 "//components/visitedlink/common",
85 "//components/autofill/content/common",
86 "//components/autofill/core/common",
87 "//components/password_manager/core/common",
88 "//components/signin/core/common",
89 "//components/translate/content/common",
90 "//extensions/common/api",
92 "//third_party/adobe/flash:flapper_version_h",
94 "//third_party/widevine/cdm:version_h",
95 #'<(DEPTH)/extensions/extensions.gyp:extensions_common', TODO(GYP)
99 if (enable_extensions) {
100 sources += rebase_path(
101 gypi_values.chrome_common_extensions_sources,
104 "//device/bluetooth",
109 if (is_win || is_mac) {
110 sources += rebase_path(
111 gypi_values.chrome_common_win_mac_sources,
115 "extensions/api/networking_private/networking_private_crypto_nss.cc",
117 # networking_private_crypto_openssl.cc depends on boringssl.
119 "//third_party/boringssl",
123 "extensions/api/networking_private/networking_private_crypto_openssl.cc",
126 deps += [ "//breakpad:client" ]
129 sources += rebase_path(
130 gypi_values.chrome_common_mac_sources,
136 #'<(DEPTH)/components/nacl.gyp:nacl_common', TODO(GYP)
139 "extensions/manifest_handlers/nacl_modules_handler.cc",
140 "extensions/manifest_handlers/nacl_modules_handler.h",
145 if (printing_mode == 0) {
151 deps += [ "//printing" ]
152 if (printing_mode == 1) {
153 # Full printing support.
154 sources += rebase_path(
155 gypi_values.chrome_common_service_process_sources,
160 if (enable_service_discovery) {
162 "local_discovery/service_discovery_client.cc",
163 "local_discovery/service_discovery_client.h",
168 "local_discovery/service_discovery_client_impl.cc",
169 "local_discovery/service_discovery_client_impl.h",
176 "chrome_version_info_posix.cc",
177 "extensions/manifest_handlers/minimum_chrome_version_checker.cc",
178 "icon_with_badge_image_source.cc",
179 "media_galleries/metadata_types.h",
180 "spellcheck_common.cc",
184 sources += rebase_path(
185 gypi_values.chrome_common_importer_sources,
190 deps += [ "//third_party/wtl" ]
194 sources += [ "local_discovery/local_discovery_messages.h" ]
198 sources -= [ "chrome_version_info_linux.cc" ]
203 "chrome_version_info_posix.cc",
206 "//third_party/mach_override",
207 "//third_party/google_toolbox_for_mac",
211 if (enable_remoting) {
212 #deps += [ '../remoting/remoting.gyp:remoting_client_plugin' ] TODO(GYP)
214 if (!enable_plugins) {
215 sources -= [ "pepper_permission_util.cc" ]
217 if (!enable_webrtc) {
218 sources -= [ "media/webrtc_logging_messages.h" ]
220 if (enable_configuration_policy) {
221 deps += [ "//components/policy" ]
224 if (safe_browsing_mode == 1) {
225 defines += [ "FULL_SAFE_BROWSING" ]
226 sources += rebase_path(
227 gypi_values.chrome_common_full_safe_browsing_sources,
230 if (safe_browsing_mode == 2) {
231 defines += [ "MOBILE_SAFE_BROWSING" ]
237 visibility = ":common"
238 script = "//build/util/version.py"
240 lastchange_path = "//build/util/LASTCHANGE"
241 version_path = "//chrome/VERSION"
242 template_input_path = "chrome_version_info_posix.h.version"
243 if (is_chrome_branded) {
244 branding_path = "//chrome/app/theme/google_chrome/BRANDING"
246 branding_path = "//chrome/app/theme/chromium/BRANDING"
256 outfile = "$target_gen_dir/chrome_version_info_posix.h"
257 outputs = [ outfile ]
260 "-f", rebase_path(version_path, root_build_dir),
261 "-f", rebase_path(branding_path, root_build_dir),
262 "-f", rebase_path(lastchange_path, root_build_dir),
263 rebase_path(template_input_path, root_build_dir),
264 rebase_path(outfile, root_build_dir),
268 # Other platforms have a different way to do versioning.
273 # GN version: chrome/common_constants.gyp:common_constants
274 static_library("constants") {
276 "chrome_constants.cc",
277 "chrome_constants.h",
278 "chrome_icon_resources_win.cc",
279 "chrome_icon_resources_win.h",
282 "chrome_paths_android.cc",
283 "chrome_paths_internal.h",
284 "chrome_paths_linux.cc",
285 "chrome_paths_mac.mm",
286 "chrome_paths_win.cc",
287 "chrome_switches.cc",
291 "net/test_server_locations.cc",
292 "net/test_server_locations.h",
293 "pref_font_script_names-inl.h",
294 "pref_font_webkit_names.h",
297 "widevine_cdm_constants.cc",
298 "widevine_cdm_constants.h",
303 "//base/third_party/dynamic_annotations",
304 "//components/bookmarks/common",
305 "//third_party/widevine/cdm:version_h",
310 #'../components/nacl.gyp:nacl_switches', TODO(GYP)