Commit 18254049 authored by Nico Weber's avatar Nico Weber Committed by Commit Bot

Inline implement_content_app now that it has a single use.

Bug: 1056290
Change-Id: I3e18eb58bff1a5167a2f28902de0a1e1566232c0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2159540
Commit-Queue: Nico Weber <thakis@chromium.org>
Commit-Queue: Ken Rockot <rockot@google.com>
Auto-Submit: Nico Weber <thakis@chromium.org>
Reviewed-by: default avatarKen Rockot <rockot@google.com>
Cr-Commit-Position: refs/heads/master@{#761178}
parent e15433f3
...@@ -6,174 +6,128 @@ import("//build/config/chrome_build.gni") ...@@ -6,174 +6,128 @@ import("//build/config/chrome_build.gni")
import("//build/config/features.gni") import("//build/config/features.gni")
import("//ppapi/buildflags/buildflags.gni") import("//ppapi/buildflags/buildflags.gni")
# Implements "content_main" given the defines and visibility. On Windows this extra_configs = [
# is compiled with a different define for browser and child, but all code needs "//build/config/compiler:wexit_time_destructors",
# to be shared. "//content:content_implementation",
# TODO(https://crbug.com/1056290): Inline the template now that it only has "//tools/v8_context_snapshot:use_v8_context_snapshot",
# a single use. "//v8:external_startup_data",
template("implement_content_app") { ]
runner_target_name = "content_main_runner_" + target_name
main_target_name = target_name content_app_deps = [
"//base",
extra_configs = [ "//base:i18n",
"//build/config/compiler:wexit_time_destructors", "//content:export",
"//content:content_implementation", "//content:sandbox_helper_win",
"//tools/v8_context_snapshot:use_v8_context_snapshot", "//content/public/common:common_sources",
"//v8:external_startup_data", "//content/public/common:service_names",
] "//crypto",
"//mojo/core/embedder",
content_app_deps = [ "//ppapi/buildflags",
"//base", "//services/service_manager/embedder",
"//base:i18n", "//services/service_manager/public/mojom",
"//content:export", "//services/tracing/public/cpp",
"//content:sandbox_helper_win", "//ui/base",
"//content/public/common:common_sources", "//ui/gfx",
"//content/public/common:service_names", "//ui/gfx/geometry",
"//crypto", ]
"//mojo/core/embedder",
"//ppapi/buildflags", if (is_win) {
"//services/service_manager/embedder", content_app_deps += [ "//sandbox" ]
"//services/service_manager/public/mojom", } else if (is_android) {
"//services/tracing/public/cpp", # Many of these are required for JNI registration.
"//ui/base", content_app_deps += [
"//ui/gfx", "//content/browser",
"//ui/gfx/geometry", "//content/child",
"//content/public/android:jni",
"//device/bluetooth",
"//device/gamepad",
"//gpu",
"//media",
"//media/capture",
"//media/midi",
"//net",
"//skia",
"//third_party/android_ndk:cpu_features",
"//ui/android",
"//ui/events",
"//ui/shell_dialogs",
] ]
}
if (is_win) { if (enable_plugins) {
content_app_deps += [ "//sandbox" ] content_app_deps += [ "//content/ppapi_plugin:ppapi_plugin_sources" ]
} else if (is_android) {
# Android doesn't use the browser/child split and in the component build
# all symbols are exported from the .so, so the Android-specific files
# can include headers from both places. Many of these are required for
# JNI registration.
content_app_deps += [
"//content/browser",
"//content/child",
"//content/public/android:jni",
"//device/bluetooth",
"//device/gamepad",
"//gpu",
"//media",
"//media/capture",
"//media/midi",
"//net",
"//skia",
"//third_party/android_ndk:cpu_features",
"//ui/android",
"//ui/events",
"//ui/shell_dialogs",
]
}
if (enable_plugins) {
content_app_deps += [ "//content/ppapi_plugin:ppapi_plugin_sources" ]
}
# Compile content_main_runner_impl.[h, cc] in a separate target to exempt from
# GN header checking without exempting any other source file. These files
# includes headers of all process types and varies significantly per platform
# in between browser and child. Otherwise it would require many "nogncheck"
# annotations that would both be useless and add noise.
#
# This will generate :content_main_runner_both, :content_main_runner_browser,
# and :content_main_runner_child.
source_set(runner_target_name) {
visibility = [ ":$main_target_name" ]
check_includes = false
sources = [
"content_main_runner_impl.cc",
"content_main_runner_impl.h",
]
configs += extra_configs
deps = content_app_deps
if (defined(invoker.deps)) {
deps += invoker.deps
}
forward_variables_from(invoker, [ "defines" ])
}
source_set(main_target_name) {
check_includes = false
sources = [
"content_service_manager_main_delegate.cc",
"content_service_manager_main_delegate.h",
"mojo/mojo_init.cc",
"mojo/mojo_init.h",
]
if (defined(invoker.include_browser_sources) &&
invoker.include_browser_sources) {
sources += [
"service_manager_environment.cc",
"service_manager_environment.h",
]
}
configs += extra_configs
deps = content_app_deps + [
":$runner_target_name",
"//ipc",
"//services/service_manager/embedder",
]
forward_variables_from(invoker,
[
"defines",
"visibility",
])
if (is_android) {
sources += [
"android/content_child_process_service_delegate.cc",
"android/content_jni_onload.cc",
"android/content_main.cc",
"android/library_loader_hooks.cc",
"android/library_loader_hooks.h",
]
deps += [
"//mojo/public/java/system:native_support",
"//ui/gl",
]
} else {
sources += [ "content_main.cc" ]
}
}
} }
group("content_app_browser_deps") { # Compile content_main_runner_impl.[h, cc] in a separate target to exempt from
deps = [ # GN header checking without exempting any other source file. These files
"//content/browser", # includes headers of all process types and varies significantly per platform
"//content/public/browser:browser_sources", # in between browser and child. Otherwise it would require many "nogncheck"
# annotations that would both be useless and add noise.
source_set("content_main_runner_app") {
visibility = [ ":app" ]
check_includes = false
sources = [
"content_main_runner_impl.cc",
"content_main_runner_impl.h",
] ]
configs += extra_configs
deps = content_app_deps + [
"//content/browser",
"//content/gpu:gpu_sources",
"//content/public/browser:browser_sources",
"//content/public/gpu:gpu_sources",
"//content/public/renderer:renderer_sources",
"//content/public/utility:utility_sources",
"//content/renderer",
"//content/utility",
]
} }
group("content_app_child_deps") { source_set("app") {
deps = [ # TODO(thakis): The comment above content_main_runner_app suggests this
"//content/public/gpu:gpu_sources", # line shouldn't be here; try removing it.
"//content/public/renderer:renderer_sources", check_includes = false
"//content/public/utility:utility_sources",
sources = [
"content_service_manager_main_delegate.cc",
"content_service_manager_main_delegate.h",
"mojo/mojo_init.cc",
"mojo/mojo_init.h",
"service_manager_environment.cc",
"service_manager_environment.h",
] ]
}
implement_content_app("app") { configs += extra_configs
deps = content_app_deps + [
":content_main_runner_app",
"//ipc",
"//services/service_manager/embedder",
]
# Only the public target should depend on this. All other targets (even # Only the public target should depend on this. All other targets (even
# internal content ones) should depend on the public one. # internal content ones) should depend on the public one.
visibility = [ visibility = [
":for_content_tests", # See top of //content/BUILD.gn for why. ":for_content_tests", # See top of //content/BUILD.gn for why.
"//content/public/app:*", "//content/public/app:*",
] ]
deps = [
":content_app_browser_deps", if (is_android) {
":content_app_child_deps", sources += [
"//content/gpu:gpu_sources", "android/content_child_process_service_delegate.cc",
"//content/renderer", "android/content_jni_onload.cc",
"//content/utility", "android/content_main.cc",
] "android/library_loader_hooks.cc",
include_browser_sources = true "android/library_loader_hooks.h",
]
deps += [
"//mojo/public/java/system:native_support",
"//ui/gl",
]
} else {
sources += [ "content_main.cc" ]
}
} }
# See comment at the top of //content/BUILD.gn for how this works. # See comment at the top of //content/BUILD.gn for how this works.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment