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,23 +6,14 @@ import("//build/config/chrome_build.gni") ...@@ -6,23 +6,14 @@ 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
# to be shared.
# TODO(https://crbug.com/1056290): Inline the template now that it only has
# a single use.
template("implement_content_app") {
runner_target_name = "content_main_runner_" + target_name
main_target_name = target_name
extra_configs = [
"//build/config/compiler:wexit_time_destructors", "//build/config/compiler:wexit_time_destructors",
"//content:content_implementation", "//content:content_implementation",
"//tools/v8_context_snapshot:use_v8_context_snapshot", "//tools/v8_context_snapshot:use_v8_context_snapshot",
"//v8:external_startup_data", "//v8:external_startup_data",
] ]
content_app_deps = [ content_app_deps = [
"//base", "//base",
"//base:i18n", "//base:i18n",
"//content:export", "//content:export",
...@@ -38,15 +29,12 @@ template("implement_content_app") { ...@@ -38,15 +29,12 @@ template("implement_content_app") {
"//ui/base", "//ui/base",
"//ui/gfx", "//ui/gfx",
"//ui/gfx/geometry", "//ui/gfx/geometry",
] ]
if (is_win) { if (is_win) {
content_app_deps += [ "//sandbox" ] content_app_deps += [ "//sandbox" ]
} else if (is_android) { } else if (is_android) {
# Android doesn't use the browser/child split and in the component build # Many of these are required for JNI registration.
# 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_app_deps += [
"//content/browser", "//content/browser",
"//content/child", "//content/child",
...@@ -64,22 +52,19 @@ template("implement_content_app") { ...@@ -64,22 +52,19 @@ template("implement_content_app") {
"//ui/events", "//ui/events",
"//ui/shell_dialogs", "//ui/shell_dialogs",
] ]
} }
if (enable_plugins) { if (enable_plugins) {
content_app_deps += [ "//content/ppapi_plugin:ppapi_plugin_sources" ] content_app_deps += [ "//content/ppapi_plugin:ppapi_plugin_sources" ]
} }
# Compile content_main_runner_impl.[h, cc] in a separate target to exempt from # 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 # GN header checking without exempting any other source file. These files
# includes headers of all process types and varies significantly per platform # includes headers of all process types and varies significantly per platform
# in between browser and child. Otherwise it would require many "nogncheck" # in between browser and child. Otherwise it would require many "nogncheck"
# annotations that would both be useless and add noise. # annotations that would both be useless and add noise.
# source_set("content_main_runner_app") {
# This will generate :content_main_runner_both, :content_main_runner_browser, visibility = [ ":app" ]
# and :content_main_runner_child.
source_set(runner_target_name) {
visibility = [ ":$main_target_name" ]
check_includes = false check_includes = false
sources = [ sources = [
...@@ -88,15 +73,21 @@ template("implement_content_app") { ...@@ -88,15 +73,21 @@ template("implement_content_app") {
] ]
configs += extra_configs configs += extra_configs
deps = content_app_deps deps = content_app_deps + [
if (defined(invoker.deps)) { "//content/browser",
deps += invoker.deps "//content/gpu:gpu_sources",
} "//content/public/browser:browser_sources",
"//content/public/gpu:gpu_sources",
forward_variables_from(invoker, [ "defines" ]) "//content/public/renderer:renderer_sources",
} "//content/public/utility:utility_sources",
"//content/renderer",
"//content/utility",
]
}
source_set(main_target_name) { source_set("app") {
# TODO(thakis): The comment above content_main_runner_app suggests this
# line shouldn't be here; try removing it.
check_includes = false check_includes = false
sources = [ sources = [
...@@ -104,27 +95,23 @@ template("implement_content_app") { ...@@ -104,27 +95,23 @@ template("implement_content_app") {
"content_service_manager_main_delegate.h", "content_service_manager_main_delegate.h",
"mojo/mojo_init.cc", "mojo/mojo_init.cc",
"mojo/mojo_init.h", "mojo/mojo_init.h",
]
if (defined(invoker.include_browser_sources) &&
invoker.include_browser_sources) {
sources += [
"service_manager_environment.cc", "service_manager_environment.cc",
"service_manager_environment.h", "service_manager_environment.h",
] ]
}
configs += extra_configs configs += extra_configs
deps = content_app_deps + [ deps = content_app_deps + [
":$runner_target_name", ":content_main_runner_app",
"//ipc", "//ipc",
"//services/service_manager/embedder", "//services/service_manager/embedder",
] ]
forward_variables_from(invoker,
[ # Only the public target should depend on this. All other targets (even
"defines", # internal content ones) should depend on the public one.
"visibility", visibility = [
]) ":for_content_tests", # See top of //content/BUILD.gn for why.
"//content/public/app:*",
]
if (is_android) { if (is_android) {
sources += [ sources += [
...@@ -141,39 +128,6 @@ template("implement_content_app") { ...@@ -141,39 +128,6 @@ template("implement_content_app") {
} else { } else {
sources += [ "content_main.cc" ] sources += [ "content_main.cc" ]
} }
}
}
group("content_app_browser_deps") {
deps = [
"//content/browser",
"//content/public/browser:browser_sources",
]
}
group("content_app_child_deps") {
deps = [
"//content/public/gpu:gpu_sources",
"//content/public/renderer:renderer_sources",
"//content/public/utility:utility_sources",
]
}
implement_content_app("app") {
# Only the public target should depend on this. All other targets (even
# internal content ones) should depend on the public one.
visibility = [
":for_content_tests", # See top of //content/BUILD.gn for why.
"//content/public/app:*",
]
deps = [
":content_app_browser_deps",
":content_app_child_deps",
"//content/gpu:gpu_sources",
"//content/renderer",
"//content/utility",
]
include_browser_sources = true
} }
# 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