1 # Copyright 2014 The Chromium Authors
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/chrome_build.gni")
6 import("//build/config/chromebox_for_meetings/buildflags.gni")
7 import("//build/config/chromeos/ui_mode.gni")
8 import("//build/config/locales.gni")
9 import("//build/config/ui.gni")
10 import("//chrome/common/features.gni")
11 import("//components/nacl/features.gni")
12 import("//crypto/features.gni")
13 import("//ppapi/buildflags/buildflags.gni")
14 import("//tools/grit/grit_rule.gni")
15 import("//tools/ipc_fuzzer/ipc_fuzzer.gni")
18 import("//build/config/android/rules.gni")
19 } else if (is_fuchsia) {
20 import("//build/config/fuchsia/packaged_content_embedder_excluded_dirs.gni")
21 import("//third_party/fuchsia-gn-sdk/src/component.gni")
22 import("//third_party/fuchsia-gn-sdk/src/package.gni")
25 # This target is for dependency tracking for the command ID header.
26 source_set("command_ids") {
27 sources = [ "chrome_command_ids.h" ]
29 "//build:branding_buildflags",
30 "//build:chromeos_buildflags",
31 "//components/services/screen_ai/buildflags",
33 deps = [ "//ui/base:constants" ]
36 # On Windows, links chrome_dll.rc. On other platforms, does nothing so you can
37 # unconditionally depend on it.
38 source_set("chrome_dll_resources") {
39 # This source is added unconditionally for include checking on non-Windows
41 sources = [ "chrome_dll_resource.h" ]
43 deps = [ ":command_ids" ]
48 "etw_events/chrome_events_win.rc",
52 "//build:branding_buildflags",
53 "//printing/buildflags",
59 source_set("chrome_exe_main_exports") {
60 sources = [ "chrome_exe_main_win.h" ]
63 source_set("exit_code_watcher") {
65 "exit_code_watcher_win.cc",
66 "exit_code_watcher_win.h",
68 public_deps = [ "//base:base" ]
71 source_set("win_unit_tests") {
74 "chrome_crash_reporter_client_win_unittest.cc",
75 "exit_code_watcher_win_unittest.cc",
80 "//base/test:test_support",
81 "//chrome/chrome_elf:crash",
82 "//testing/gtest:gtest",
88 source_set("notification_metrics") {
90 "notification_metrics.cc",
91 "notification_metrics.h",
98 android_generated_java_resources =
99 [ "java/res/values/generated_resources.xml" ] +
100 process_file_template(
101 android_bundle_locales_as_resources,
102 [ "java/res/values-{{source_name_part}}/generated_resources.xml" ])
104 strings_java_resources = [ "java/res/values/${branding_path_product}_strings.xml" ] + process_file_template(
105 android_bundle_locales_as_resources,
106 [ "java/res/values-{{source_name_part}}/${branding_path_product}_strings.xml" ])
109 grit("generated_resources") {
110 source = "generated_resources.grd"
111 defines = chrome_grit_defines + [ "is_cfm=${is_cfm}" ]
112 output_dir = "$root_gen_dir/chrome"
114 [ "grit/generated_resources.h" ] +
115 process_file_template(all_chrome_locales,
116 [ "generated_resources_{{source_name_part}}.pak" ])
118 outputs += android_generated_java_resources
123 java_strings_grd_prebuilt("java_strings_grd") {
124 grit_output_dir = "$root_gen_dir/chrome/java/res"
126 rebase_path(android_generated_java_resources, "java/res", ".") +
127 rebase_path(strings_java_resources, "java/res", ".")
130 ":generated_resources",
135 grit("branded_strings") {
136 source = "${branding_path_product}_strings.grd"
137 defines = chrome_grit_defines
138 output_dir = "$root_gen_dir/chrome"
139 outputs = [ "grit/branded_strings.h" ] +
140 process_file_template(
142 [ "${branding_path_product}_strings_{{source_name_part}}.pak" ])
145 outputs += strings_java_resources
149 static_library("test_support") {
151 visibility = [ "//chrome/test:test_support" ]
154 "chrome_main_delegate.cc",
155 "chrome_main_delegate.h",
160 "//build:chromeos_buildflags",
162 "//chrome/browser:buildflags",
163 "//chrome/browser/policy:path_parser",
166 "//chrome/common:version_header",
170 "//components/about_ui",
171 "//components/devtools/devtools_pipe",
172 "//components/memory_system",
173 "//components/nacl/common:buildflags",
174 "//components/startup_metric_utils",
175 "//content/public/app",
176 "//content/public/common",
177 "//extensions/buildflags",
178 "//ppapi/buildflags",
179 "//printing/buildflags",
180 "//services/tracing/public/cpp",
187 # TODO(crbug.com/1226159): Complete crash reporting integration on Fuchsia.
189 "//components/crash/core/app",
190 "//components/crash/core/app:test_support",
196 "//chrome/browser/flags:flags_android",
197 "//components/crash/android:crash_android",
202 sources += [ "chrome_main_mac.mm" ]
204 deps += [ "//chrome:chrome_framework" ]
209 "//chrome/chrome_elf:test_stubs",
210 "//chrome/install_static:install_static_util",
211 "//sandbox/win:sandbox",
217 "//chromeos/dbus/constants",
218 "//ui/gfx/linux:gbm",
222 if (is_chromeos_ash) {
225 "//chrome/browser/ash",
227 "//chromeos/ash/components/memory:memory",
229 public_deps += [ "//ui/lottie" ]
232 if (is_chromeos_lacros) {
234 "//chromeos/crosapi/cpp:crosapi_constants",
235 "//chromeos/crosapi/mojom",
237 "//chromeos/lacros:lacros_paths",
238 "//chromeos/lacros/dbus",
239 "//chromeos/startup",
243 if (enable_plugins && enable_nacl) {
245 "//components/nacl/browser",
246 "//components/nacl/renderer/plugin:nacl_trusted_plugin",
252 # Generate a packaged component, and an installer script to aid development.
254 fuchsia_component("chrome_component") {
255 visibility = [ ":*" ]
256 manifest = "chrome.cml"
257 data_deps = [ "//chrome:chrome_initial" ]
260 fuchsia_package("chrome_pkg") {
261 package_name = "chrome"
262 deps = [ ":chrome_component" ]
264 excluded_dirs = FUCHSIA_PACKAGED_CONTENT_EMBEDDER_EXCLUDED_DIRS
267 fuchsia_package_installer("chrome_fuchsia") {
269 ":*", # See https://crbug.com/1328459#c4.
274 package = ":chrome_pkg"
275 package_name = "chrome"