mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-11-28 00:06:09 +03:00
569 lines
18 KiB
Plaintext
569 lines
18 KiB
Plaintext
# Copyright 2014 The Chromium Authors. All rights reserved.
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
|
|
import("//build/config/ui.gni")
|
|
import("//chrome/common/features.gni")
|
|
import("//chromeos/assistant/assistant.gni")
|
|
import("//components/nacl/features.gni")
|
|
import("//ppapi/buildflags/buildflags.gni")
|
|
import("//printing/buildflags/buildflags.gni")
|
|
import("//services/catalog/public/tools/catalog.gni")
|
|
import("//services/service_manager/public/service_manifest.gni")
|
|
import("//tools/grit/grit_rule.gni")
|
|
import("//tools/ipc_fuzzer/ipc_fuzzer.gni")
|
|
|
|
# This target is for dependency tracking for the command ID header.
|
|
source_set("command_ids") {
|
|
sources = [
|
|
"chrome_command_ids.h",
|
|
]
|
|
}
|
|
|
|
# TODO: put back in chrome/browser if necessary. http://crbug.com/771801.
|
|
source_set("shutdown_signal_handlers") {
|
|
if (is_posix || is_fuchsia) {
|
|
sources = [
|
|
"shutdown_signal_handlers_posix.cc",
|
|
"shutdown_signal_handlers_posix.h",
|
|
]
|
|
}
|
|
deps = [
|
|
"//base",
|
|
]
|
|
}
|
|
|
|
# On Windows, links chrome_dll.rc. On other platforms, does nothing so you can
|
|
# unconditionally depend on it.
|
|
source_set("chrome_dll_resources") {
|
|
# This source is added unconditionally for include checking on non-Windows
|
|
# platforms.
|
|
sources = [
|
|
"chrome_dll_resource.h",
|
|
]
|
|
|
|
deps = [
|
|
":command_ids",
|
|
]
|
|
|
|
if (is_win) {
|
|
sources += [ "chrome_dll.rc" ]
|
|
if (enable_basic_printing) {
|
|
# The resource compiler can only handle macro functions up to 31 chars
|
|
# which the buildflag system produces for this. Make a define so we can
|
|
# toggle off of the enable-basic-printing flag in the .rc file.
|
|
defines = [ "ENABLE_PRINTING_FOR_RC" ]
|
|
}
|
|
deps += [ "//printing/buildflags" ]
|
|
}
|
|
}
|
|
|
|
if (is_android) {
|
|
import("//build/config/android/rules.gni")
|
|
android_generated_java_resources = [
|
|
"java/res/values-am/generated_resources.xml",
|
|
"java/res/values-ar/generated_resources.xml",
|
|
"java/res/values-bg/generated_resources.xml",
|
|
"java/res/values-ca/generated_resources.xml",
|
|
"java/res/values-cs/generated_resources.xml",
|
|
"java/res/values-da/generated_resources.xml",
|
|
"java/res/values-de/generated_resources.xml",
|
|
"java/res/values-el/generated_resources.xml",
|
|
"java/res/values-en-rGB/generated_resources.xml",
|
|
"java/res/values-es-rUS/generated_resources.xml",
|
|
"java/res/values-es/generated_resources.xml",
|
|
"java/res/values-fa/generated_resources.xml",
|
|
"java/res/values-fi/generated_resources.xml",
|
|
"java/res/values-fr/generated_resources.xml",
|
|
"java/res/values-hi/generated_resources.xml",
|
|
"java/res/values-hr/generated_resources.xml",
|
|
"java/res/values-hu/generated_resources.xml",
|
|
"java/res/values-in/generated_resources.xml",
|
|
"java/res/values-it/generated_resources.xml",
|
|
"java/res/values-iw/generated_resources.xml",
|
|
"java/res/values-ja/generated_resources.xml",
|
|
"java/res/values-ko/generated_resources.xml",
|
|
"java/res/values-lt/generated_resources.xml",
|
|
"java/res/values-lv/generated_resources.xml",
|
|
"java/res/values-nb/generated_resources.xml",
|
|
"java/res/values-nl/generated_resources.xml",
|
|
"java/res/values-pl/generated_resources.xml",
|
|
"java/res/values-pt-rBR/generated_resources.xml",
|
|
"java/res/values-pt-rPT/generated_resources.xml",
|
|
"java/res/values-ro/generated_resources.xml",
|
|
"java/res/values-ru/generated_resources.xml",
|
|
"java/res/values-sk/generated_resources.xml",
|
|
"java/res/values-sl/generated_resources.xml",
|
|
"java/res/values-sr/generated_resources.xml",
|
|
"java/res/values-sv/generated_resources.xml",
|
|
"java/res/values-sw/generated_resources.xml",
|
|
"java/res/values-th/generated_resources.xml",
|
|
"java/res/values-tl/generated_resources.xml",
|
|
"java/res/values-tr/generated_resources.xml",
|
|
"java/res/values-uk/generated_resources.xml",
|
|
"java/res/values-vi/generated_resources.xml",
|
|
"java/res/values-zh-rCN/generated_resources.xml",
|
|
"java/res/values-zh-rTW/generated_resources.xml",
|
|
"java/res/values/generated_resources.xml",
|
|
]
|
|
}
|
|
|
|
grit("generated_resources") {
|
|
source = "generated_resources.grd"
|
|
defines = chrome_grit_defines
|
|
output_dir = "$root_gen_dir/chrome"
|
|
outputs = [
|
|
"grit/generated_resources.h",
|
|
"generated_resources_am.pak",
|
|
"generated_resources_ar.pak",
|
|
"generated_resources_bg.pak",
|
|
"generated_resources_bn.pak",
|
|
"generated_resources_ca.pak",
|
|
"generated_resources_cs.pak",
|
|
"generated_resources_da.pak",
|
|
"generated_resources_de.pak",
|
|
"generated_resources_el.pak",
|
|
"generated_resources_en-GB.pak",
|
|
"generated_resources_en-US.pak",
|
|
"generated_resources_es.pak",
|
|
"generated_resources_es-419.pak",
|
|
"generated_resources_et.pak",
|
|
"generated_resources_fa.pak",
|
|
"generated_resources_fake-bidi.pak",
|
|
"generated_resources_fi.pak",
|
|
"generated_resources_fil.pak",
|
|
"generated_resources_fr.pak",
|
|
"generated_resources_gu.pak",
|
|
"generated_resources_he.pak",
|
|
"generated_resources_hi.pak",
|
|
"generated_resources_hr.pak",
|
|
"generated_resources_hu.pak",
|
|
"generated_resources_id.pak",
|
|
"generated_resources_it.pak",
|
|
"generated_resources_ja.pak",
|
|
"generated_resources_kn.pak",
|
|
"generated_resources_ko.pak",
|
|
"generated_resources_lt.pak",
|
|
"generated_resources_lv.pak",
|
|
"generated_resources_ml.pak",
|
|
"generated_resources_mr.pak",
|
|
"generated_resources_ms.pak",
|
|
"generated_resources_nl.pak",
|
|
"generated_resources_nb.pak",
|
|
"generated_resources_pl.pak",
|
|
"generated_resources_pt-BR.pak",
|
|
"generated_resources_pt-PT.pak",
|
|
"generated_resources_ro.pak",
|
|
"generated_resources_ru.pak",
|
|
"generated_resources_sk.pak",
|
|
"generated_resources_sl.pak",
|
|
"generated_resources_sr.pak",
|
|
"generated_resources_sv.pak",
|
|
"generated_resources_sw.pak",
|
|
"generated_resources_ta.pak",
|
|
"generated_resources_te.pak",
|
|
"generated_resources_th.pak",
|
|
"generated_resources_tr.pak",
|
|
"generated_resources_uk.pak",
|
|
"generated_resources_vi.pak",
|
|
"generated_resources_zh-CN.pak",
|
|
"generated_resources_zh-TW.pak",
|
|
]
|
|
|
|
if (is_android) {
|
|
outputs += android_generated_java_resources
|
|
}
|
|
}
|
|
|
|
if (is_android) {
|
|
java_strings_grd_prebuilt("java_strings_grd") {
|
|
grit_output_dir = "$root_gen_dir/chrome/java/res"
|
|
generated_files =
|
|
rebase_path(android_generated_java_resources, "java/res", ".")
|
|
deps = [
|
|
":generated_resources",
|
|
]
|
|
}
|
|
}
|
|
|
|
grit("google_chrome_strings") {
|
|
source = "google_chrome_strings.grd"
|
|
defines = chrome_grit_defines
|
|
output_dir = "$root_gen_dir/chrome"
|
|
outputs = [
|
|
"grit/google_chrome_strings.h",
|
|
"google_chrome_strings_am.pak",
|
|
"google_chrome_strings_ar.pak",
|
|
"google_chrome_strings_bg.pak",
|
|
"google_chrome_strings_bn.pak",
|
|
"google_chrome_strings_ca.pak",
|
|
"google_chrome_strings_cs.pak",
|
|
"google_chrome_strings_da.pak",
|
|
"google_chrome_strings_de.pak",
|
|
"google_chrome_strings_el.pak",
|
|
"google_chrome_strings_en-GB.pak",
|
|
"google_chrome_strings_en-US.pak",
|
|
"google_chrome_strings_es.pak",
|
|
"google_chrome_strings_es-419.pak",
|
|
"google_chrome_strings_et.pak",
|
|
"google_chrome_strings_fa.pak",
|
|
"google_chrome_strings_fi.pak",
|
|
"google_chrome_strings_fil.pak",
|
|
"google_chrome_strings_fr.pak",
|
|
"google_chrome_strings_gu.pak",
|
|
"google_chrome_strings_he.pak",
|
|
"google_chrome_strings_hi.pak",
|
|
"google_chrome_strings_hr.pak",
|
|
"google_chrome_strings_hu.pak",
|
|
"google_chrome_strings_id.pak",
|
|
"google_chrome_strings_it.pak",
|
|
"google_chrome_strings_ja.pak",
|
|
"google_chrome_strings_kn.pak",
|
|
"google_chrome_strings_ko.pak",
|
|
"google_chrome_strings_lt.pak",
|
|
"google_chrome_strings_lv.pak",
|
|
"google_chrome_strings_ml.pak",
|
|
"google_chrome_strings_mr.pak",
|
|
"google_chrome_strings_ms.pak",
|
|
"google_chrome_strings_nl.pak",
|
|
"google_chrome_strings_nb.pak",
|
|
"google_chrome_strings_pl.pak",
|
|
"google_chrome_strings_pt-BR.pak",
|
|
"google_chrome_strings_pt-PT.pak",
|
|
"google_chrome_strings_ro.pak",
|
|
"google_chrome_strings_ru.pak",
|
|
"google_chrome_strings_sk.pak",
|
|
"google_chrome_strings_sl.pak",
|
|
"google_chrome_strings_sr.pak",
|
|
"google_chrome_strings_sv.pak",
|
|
"google_chrome_strings_sw.pak",
|
|
"google_chrome_strings_ta.pak",
|
|
"google_chrome_strings_te.pak",
|
|
"google_chrome_strings_th.pak",
|
|
"google_chrome_strings_tr.pak",
|
|
"google_chrome_strings_uk.pak",
|
|
"google_chrome_strings_vi.pak",
|
|
"google_chrome_strings_zh-CN.pak",
|
|
"google_chrome_strings_zh-TW.pak",
|
|
"google_chrome_strings_fake-bidi.pak",
|
|
]
|
|
}
|
|
|
|
grit("chromium_strings") {
|
|
source = "chromium_strings.grd"
|
|
defines = chrome_grit_defines
|
|
output_dir = "$root_gen_dir/chrome"
|
|
outputs = [
|
|
"grit/chromium_strings.h",
|
|
"chromium_strings_am.pak",
|
|
"chromium_strings_ar.pak",
|
|
"chromium_strings_bg.pak",
|
|
"chromium_strings_bn.pak",
|
|
"chromium_strings_ca.pak",
|
|
"chromium_strings_cs.pak",
|
|
"chromium_strings_da.pak",
|
|
"chromium_strings_de.pak",
|
|
"chromium_strings_el.pak",
|
|
"chromium_strings_en-GB.pak",
|
|
"chromium_strings_en-US.pak",
|
|
"chromium_strings_es.pak",
|
|
"chromium_strings_es-419.pak",
|
|
"chromium_strings_et.pak",
|
|
"chromium_strings_fa.pak",
|
|
"chromium_strings_fake-bidi.pak",
|
|
"chromium_strings_fi.pak",
|
|
"chromium_strings_fil.pak",
|
|
"chromium_strings_fr.pak",
|
|
"chromium_strings_gu.pak",
|
|
"chromium_strings_he.pak",
|
|
"chromium_strings_hi.pak",
|
|
"chromium_strings_hr.pak",
|
|
"chromium_strings_hu.pak",
|
|
"chromium_strings_id.pak",
|
|
"chromium_strings_it.pak",
|
|
"chromium_strings_ja.pak",
|
|
"chromium_strings_kn.pak",
|
|
"chromium_strings_ko.pak",
|
|
"chromium_strings_lt.pak",
|
|
"chromium_strings_lv.pak",
|
|
"chromium_strings_ml.pak",
|
|
"chromium_strings_mr.pak",
|
|
"chromium_strings_ms.pak",
|
|
"chromium_strings_nl.pak",
|
|
"chromium_strings_nb.pak",
|
|
"chromium_strings_pl.pak",
|
|
"chromium_strings_pt-BR.pak",
|
|
"chromium_strings_pt-PT.pak",
|
|
"chromium_strings_ro.pak",
|
|
"chromium_strings_ru.pak",
|
|
"chromium_strings_sk.pak",
|
|
"chromium_strings_sl.pak",
|
|
"chromium_strings_sr.pak",
|
|
"chromium_strings_sv.pak",
|
|
"chromium_strings_sw.pak",
|
|
"chromium_strings_ta.pak",
|
|
"chromium_strings_te.pak",
|
|
"chromium_strings_th.pak",
|
|
"chromium_strings_tr.pak",
|
|
"chromium_strings_uk.pak",
|
|
"chromium_strings_vi.pak",
|
|
"chromium_strings_zh-CN.pak",
|
|
"chromium_strings_zh-TW.pak",
|
|
]
|
|
}
|
|
|
|
static_library("test_support") {
|
|
testonly = true
|
|
visibility = [ "//chrome/test:test_support" ]
|
|
|
|
sources = [
|
|
"chrome_main_delegate.cc",
|
|
"chrome_main_delegate.h",
|
|
]
|
|
|
|
deps = [
|
|
"//base",
|
|
"//chrome/app:shutdown_signal_handlers",
|
|
"//chrome/browser",
|
|
"//chrome/browser/policy:path_parser",
|
|
"//chrome/child",
|
|
"//chrome/common",
|
|
"//chrome/gpu",
|
|
"//chrome/renderer",
|
|
"//chrome/utility",
|
|
"//components/nacl/common:buildflags",
|
|
"//components/startup_metric_utils/browser:lib",
|
|
"//content/public/app:both",
|
|
"//content/public/common",
|
|
"//content/public/common:service_names",
|
|
"//pdf",
|
|
"//ppapi/buildflags",
|
|
"//printing/buildflags",
|
|
"//services/service_manager/embedder",
|
|
"//ui/base",
|
|
"//v8:v8_headers",
|
|
]
|
|
|
|
if (!is_fuchsia) {
|
|
# TODO(crbug.com/753619): Enable crash reporting on Fuchsia.
|
|
deps += [
|
|
"//components/crash/content/app",
|
|
"//components/crash/content/app:test_support",
|
|
]
|
|
}
|
|
|
|
if (is_mac) {
|
|
sources += [ "chrome_main_mac.mm" ]
|
|
|
|
deps += [ "//chrome:chrome_framework" ]
|
|
}
|
|
|
|
if (is_win) {
|
|
deps += [
|
|
"//chrome:chrome_initial",
|
|
"//chrome/install_static:install_static_util",
|
|
"//chrome_elf:test_stubs",
|
|
"//sandbox/win:sandbox",
|
|
]
|
|
}
|
|
|
|
if (is_chromeos) {
|
|
deps += [ "//chrome/browser/chromeos" ]
|
|
}
|
|
|
|
if (enable_plugins && enable_nacl) {
|
|
deps += [
|
|
"//components/nacl/browser",
|
|
"//components/nacl/renderer/plugin:nacl_trusted_plugin",
|
|
]
|
|
}
|
|
|
|
if (enable_mus) {
|
|
deps += [
|
|
"//ash/components/quick_launch/public/mojom:constants",
|
|
"//mash/common",
|
|
"//services/ui/public/interfaces:constants",
|
|
]
|
|
}
|
|
}
|
|
|
|
chrome_packaged_services = [
|
|
":chrome_manifest",
|
|
"//components/services/patch:manifest",
|
|
"//components/services/unzip:manifest",
|
|
"//chrome/services/file_util:manifest",
|
|
"//services/proxy_resolver:proxy_resolver_manifest",
|
|
"//services/preferences:local_state_manifest",
|
|
]
|
|
|
|
if (enable_basic_printing) {
|
|
chrome_packaged_services +=
|
|
[ "//components/services/pdf_compositor:pdf_compositor_manifest" ]
|
|
}
|
|
|
|
if (enable_print_preview) {
|
|
chrome_packaged_services += [ "//chrome/services/printing:manifest" ]
|
|
}
|
|
|
|
if (enable_extensions) {
|
|
chrome_packaged_services +=
|
|
[ "//chrome/services/removable_storage_writer:manifest" ]
|
|
}
|
|
|
|
if (enable_extensions || is_android) {
|
|
chrome_packaged_services +=
|
|
[ "//chrome/services/media_gallery_util:manifest" ]
|
|
}
|
|
|
|
if (is_chromeos) {
|
|
chrome_packaged_services +=
|
|
[ "//chrome/browser/chromeos:ash_pref_connector_manifest" ]
|
|
}
|
|
|
|
if (is_win) {
|
|
chrome_packaged_services += [
|
|
"//chrome/services/util_win:manifest",
|
|
"//chrome/services/wifi_util_win:manifest",
|
|
]
|
|
}
|
|
|
|
if (!is_android) {
|
|
chrome_packaged_services += [ "//chrome/utility:profile_import_manifest" ]
|
|
}
|
|
|
|
service_manifest("chrome_manifest") {
|
|
source = "chrome_manifest.json"
|
|
}
|
|
|
|
service_manifest("chrome_renderer_manifest") {
|
|
source = "chrome_renderer_manifest.json"
|
|
}
|
|
|
|
service_manifest("chrome_content_packaged_services_manifest_overlay") {
|
|
source =
|
|
"//chrome/browser/chrome_content_packaged_services_manifest_overlay.json"
|
|
packaged_services = chrome_packaged_services
|
|
if (is_chromeos) {
|
|
packaged_services += [
|
|
"//ash/components/autoclick:manifest",
|
|
"//ash/components/quick_launch:manifest",
|
|
"//ash/components/shortcut_viewer:manifest",
|
|
"//ash/components/tap_visualizer:manifest",
|
|
"//ash:manifest",
|
|
"//components/services/font:manifest",
|
|
]
|
|
}
|
|
}
|
|
|
|
service_manifest("chrome_content_browser_manifest_overlay") {
|
|
source = "//chrome/browser/chrome_content_browser_manifest_overlay.json"
|
|
packaged_services = [
|
|
"//services/identity:manifest",
|
|
"//services/preferences:manifest",
|
|
]
|
|
if (enable_cros_assistant) {
|
|
packaged_services += [ "//chromeos/services/assistant:manifest" ]
|
|
}
|
|
if (is_chromeos) {
|
|
packaged_services += [ "//chromeos/services/multidevice_setup:manifest" ]
|
|
}
|
|
}
|
|
|
|
service_manifest("chrome_test_browser_overlay") {
|
|
source = "//chrome/browser/chrome_test_browser_overlay.json"
|
|
}
|
|
|
|
service_manifest("chrome_content_gpu_manifest_overlay") {
|
|
source = "//chrome/browser/chrome_content_gpu_manifest_overlay.json"
|
|
}
|
|
|
|
service_manifest("chrome_content_plugin_manifest_overlay") {
|
|
source = "//chrome/browser/chrome_content_plugin_manifest_overlay.json"
|
|
}
|
|
|
|
service_manifest("chrome_content_renderer_manifest_overlay") {
|
|
source = "//chrome/browser/chrome_content_renderer_manifest_overlay.json"
|
|
}
|
|
|
|
service_manifest("chrome_content_utility_manifest_overlay") {
|
|
source = "//chrome/browser/chrome_content_utility_manifest_overlay.json"
|
|
}
|
|
|
|
group("chrome_content_manifest_overlays") {
|
|
deps = [
|
|
":chrome_content_browser_manifest_overlay",
|
|
":chrome_content_gpu_manifest_overlay",
|
|
":chrome_content_packaged_services_manifest_overlay",
|
|
":chrome_content_plugin_manifest_overlay",
|
|
":chrome_content_renderer_manifest_overlay",
|
|
":chrome_content_utility_manifest_overlay",
|
|
]
|
|
}
|
|
|
|
if (use_aura || enable_ipc_fuzzer) {
|
|
# NOTE: These rules generate compiled versions of the content service
|
|
# manifests with Chrome's overlays applied. These are only used at run-time,
|
|
# and only when running Chrome inside the Mash environment. In production
|
|
# Chrome, the content manifests and Chrome's overlays are baked into browser
|
|
# resources and merged at runtime.
|
|
|
|
service_manifest("chrome_content_packaged_services_manifest") {
|
|
source_manifest = "//content/public/app:packaged_services_manifest"
|
|
overlays = [ ":chrome_content_packaged_services_manifest_overlay" ]
|
|
}
|
|
|
|
service_manifest("chrome_content_browser_manifest") {
|
|
source_manifest = "//content/public/app:browser_manifest"
|
|
overlays = [ ":chrome_content_browser_manifest_overlay" ]
|
|
}
|
|
|
|
service_manifest("chrome_test_browser_manifest") {
|
|
source_manifest = ":chrome_content_browser_manifest"
|
|
overlays = [ ":chrome_test_browser_overlay" ]
|
|
}
|
|
|
|
service_manifest("chrome_content_gpu_manifest") {
|
|
source_manifest = "//content/public/app:gpu_manifest"
|
|
overlays = [ ":chrome_content_gpu_manifest_overlay" ]
|
|
}
|
|
|
|
service_manifest("chrome_content_plugin_manifest") {
|
|
source_manifest = "//content/public/app:plugin_manifest"
|
|
overlays = [ ":chrome_content_plugin_manifest_overlay" ]
|
|
}
|
|
|
|
service_manifest("chrome_content_renderer_manifest") {
|
|
source_manifest = "//content/public/app:renderer_manifest"
|
|
overlays = [ ":chrome_content_renderer_manifest_overlay" ]
|
|
}
|
|
|
|
service_manifest("chrome_content_utility_manifest") {
|
|
source_manifest = "//content/public/app:utility_manifest"
|
|
overlays = [ ":chrome_content_utility_manifest_overlay" ]
|
|
}
|
|
|
|
group("service_manifests") {
|
|
deps = [
|
|
":chrome_content_browser_manifest",
|
|
":chrome_content_gpu_manifest",
|
|
":chrome_content_plugin_manifest",
|
|
":chrome_content_renderer_manifest",
|
|
":chrome_content_utility_manifest",
|
|
]
|
|
}
|
|
|
|
chrome_embedded_services = [
|
|
":chrome_content_browser_manifest",
|
|
":chrome_content_gpu_manifest",
|
|
":chrome_content_plugin_manifest",
|
|
":chrome_content_renderer_manifest",
|
|
":chrome_content_utility_manifest",
|
|
":chrome_renderer_manifest",
|
|
]
|
|
|
|
catalog("catalog") {
|
|
embedded_services = chrome_embedded_services +
|
|
[ ":chrome_content_packaged_services_manifest" ]
|
|
}
|
|
}
|