0

Remove both vs browser/child split in content gn files.

No intended behavior change.

Bug: 1056290
Change-Id: I60ec2cd5fbe0f151ed1d995b4c13cfcab6758084
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2157965
Commit-Queue: John Abd-El-Malek <jam@chromium.org>
Auto-Submit: Nico Weber <thakis@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#761087}
This commit is contained in:
Nico Weber
2020-04-21 19:40:18 +00:00
committed by Commit Bot
parent f61dca7d24
commit 73db2f5383
19 changed files with 46 additions and 70 deletions
BUILD.gn
android_webview/lib
ash
chrome
chromecast
content
extensions/shell
fuchsia/engine
headless
weblayer

@ -572,7 +572,7 @@ group("gn_all") {
if (is_android || (is_linux && !is_chromeos)) {
deps += [
"//components/network_hints/browser",
"//content/public/app:both",
"//content/public/app",
"//mojo:mojo_perftests",
"//services/service_manager/public/cpp",
"//testing/gmock:gmock_main",

@ -31,7 +31,7 @@ source_set("lib") {
"//components/version_info",
"//components/version_info/android:channel_getter",
"//components/viz/common",
"//content/public/app:both",
"//content/public/app",
"//content/public/browser",
"//content/public/common",
"//content/public/common:content_descriptor_keys",

@ -2340,7 +2340,7 @@ executable("ash_shell_with_content") {
"//base",
"//components/user_manager",
"//content",
"//content/public/app:both",
"//content/public/app",
"//device/bluetooth",
]
}

@ -230,7 +230,7 @@ if (!is_android && !is_mac) {
# Needed to use the master_preferences functions
"//chrome/installer/util:with_no_strings",
"//content/public/app:both",
"//content/public/app",
"//content/public/common:service_names",
# For headless mode.
@ -354,7 +354,7 @@ if (is_win) {
deps += [
":child_dependencies",
"//content/public/app:both",
"//content/public/app",
"//headless:headless_renderer",
]
@ -929,7 +929,7 @@ if (is_win) {
"//chrome/common/profiler",
"//components/crash/core/app",
"//components/policy:generated",
"//content/public/app:both",
"//content/public/app",
"//content/public/common:service_names",
"//headless:headless_shell_lib",
"//services/service_manager/embedder",
@ -1485,7 +1485,7 @@ if (is_android) {
"//components/safe_browsing:buildflags",
"//components/safe_browsing/android:safe_browsing_mobile",
"//components/services/heap_profiling",
"//content/public/app:both",
"//content/public/app",
"//content/public/common:service_names",
"//services/service_manager/embedder",
]

@ -126,7 +126,7 @@ static_library("test_support") {
"//components/gwp_asan/buildflags",
"//components/nacl/common:buildflags",
"//components/startup_metric_utils/browser",
"//content/public/app:both",
"//content/public/app",
"//content/public/common",
"//content/public/common:service_names",
"//pdf",

@ -204,7 +204,7 @@ static_library("test_support") {
"//components/update_client:test_support",
"//components/variations:test_support",
"//components/web_resource:test_support",
"//content/public/app:both",
"//content/public/app",
"//content/public/child",
"//content/public/common",
"//content/public/renderer",
@ -3695,7 +3695,7 @@ test("unit_tests") {
"//components/ukm/content",
"//components/version_info:generate_version_info",
"//content/app/resources",
"//content/public/app:both",
"//content/public/app",
"//content/test:test_support",
"//courgette:courgette_lib",
"//crypto:platform",

@ -486,7 +486,7 @@ cast_executable("cast_shell") {
":cast_shell_lib",
":chromecast_locales_pak",
"//chromecast/app",
"//content/public/app:both",
"//content/public/app",
]
}

@ -26,7 +26,7 @@ cast_shared_library("libcast_shell_android") {
"//chromecast/media/cma/backend/android:cast_media_android",
"//components/crash/android:crash_android",
"//components/minidump_uploader",
"//content/public/app:both",
"//content/public/app",
"//content/public/browser",
"//skia",
]

@ -24,7 +24,7 @@ cast_source_set("app") {
"//chromecast/renderer",
"//chromecast/utility",
"//components/crash/core/common:crash_key",
"//content/public/app:both",
"//content/public/app",
"//content/public/browser",
"//content/public/common",
"//ui/base",

@ -82,7 +82,7 @@ if (!is_nacl_nonsfi) {
if (is_component_build) {
component("content") {
public_deps =
content_shared_components + [ "//content/public/app:both_sources" ]
content_shared_components + [ "//content/public/app:app_sources" ]
}
} else if (is_nacl_nonsfi) {
source_set("content") {

@ -159,12 +159,11 @@ group("content_app_child_deps") {
]
}
# This includes the app sources for both the browser and child processes.
implement_content_app("both") {
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 = [
":both_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:*",
]
deps = [
@ -178,9 +177,9 @@ implement_content_app("both") {
}
# See comment at the top of //content/BUILD.gn for how this works.
group("both_for_content_tests") {
group("for_content_tests") {
visibility = [ "//content/test/*" ]
if (!is_component_build) {
public_deps = [ ":both" ]
public_deps = [ ":app" ]
}
}

@ -18,7 +18,7 @@
# foo ->
# //content/public/app:child (group; "browser" and "both" ones look the same)
# //content (shared library) ->
# //content/public/app:both_sources (source set)
# //content/public/app:app_sources (source set)
import("//build/config/chrome_build.gni")
import("//build/config/ui.gni")
@ -46,7 +46,7 @@ public_app_shared_deps = [
]
if (is_component_build) {
source_set("both_sources") {
source_set("app_sources") {
# Only the main content shared library can pull this in.
visibility = [ "//content:content" ]
@ -55,7 +55,7 @@ if (is_component_build) {
configs += [ "//content:content_implementation" ]
deps = public_app_shared_deps + [
"//content/app:both",
"//content/app",
"//content/public/browser:browser_sources",
"//content/public/gpu:gpu_sources",
"//content/public/renderer:renderer_sources",
@ -65,39 +65,20 @@ if (is_component_build) {
allow_circular_includes_from = [
# This target is a pair with the non-public version. They always go
# together and include headers from each other.
"//content/app:both",
"//content/app",
]
}
# These all just forward to content, which in turn depends on "both_sources".
group("browser") {
public_deps = [ "//content" ]
}
group("child") {
public_deps = [ "//content" ]
}
group("both") {
# This just forwards to content, which in turn depends on "app_sources".
group("app") {
public_deps = [ "//content" ]
}
} else {
# content_main_delegate.cc conditionally includes content_browser_client.h
# from //content/public/browser when it's not the child build. However,
# the header checker doesn't know this doesn't apply and throws an error.
# So all of these targets set check_includes = false.
#
# TODO(brettw) either teach the header checker to understand simple
# ifdefs or split the file apart so we can enable header checking here.
# Furthermore, since this file exists in more than one target, they all
# have to opt-out of header checking (a file is checked once for all
# targets using a source file).
source_set("both") {
check_includes = false # See comment above.
source_set("app") {
sources = public_app_shared_sources
configs += [ "//content:content_implementation" ]
deps = public_app_shared_deps + [
"//content/app:both",
"//content/app",
"//content/public/browser",
"//content/public/common",
"//content/public/gpu:gpu_sources",
@ -108,13 +89,9 @@ if (is_component_build) {
allow_circular_includes_from = [
# This target is a pair with the non-public version. They always go
# together and include headers from each other.
"//content/app:both",
"//content/app",
]
}
# When the multi-DLL build is disabled, there is only one type of the
# "app" target, and "browser" and "child" are the same as "both".
# TODO(https://crbug.com/1056290): Remove these now that they are pointless.
}
source_set("content_browser_manifest") {

@ -231,7 +231,7 @@ static_library("content_shell_app") {
":content_shell_lib",
":web_test_common",
":web_test_renderer",
"//content/public/app:both",
"//content/public/app",
"//v8",
]
if (!is_fuchsia) {
@ -390,7 +390,7 @@ static_library("content_shell_lib") {
":android_shell_descriptors",
# content_shell_lib also exposes all public content APIs.
"//content/public/app:both",
"//content/public/app",
"//content/public/browser",
"//content/public/child",
"//content/public/common",
@ -739,7 +739,7 @@ if (is_android) {
":content_shell_app",
":pak",
"//build/win:default_exe_manifest",
"//content/public/app:both",
"//content/public/app",
]
data_deps = [
@ -883,7 +883,7 @@ if (is_mac) {
":content_shell_framework_helpers",
":content_shell_framework_resources",
":content_shell_swiftshader_library",
"//content/public/app:both",
"//content/public/app",
"//content/public/common",
"//third_party/icu:icudata",
]

@ -355,7 +355,7 @@ jumbo_static_library("test_support") {
public_deps = [
"//components/download/public/common:test_support",
"//components/services/storage/public/mojom",
"//content/public/app:both",
"//content/public/app",
"//content/public/browser",
"//content/public/common",
"//ipc",
@ -374,7 +374,7 @@ jumbo_static_library("test_support") {
"//cc:test_support",
"//components/viz/client",
"//components/viz/host",
"//content/app:both_for_content_tests",
"//content/app:for_content_tests",
"//content/browser:for_content_tests",
"//content/browser/speech/proto",
"//content/child:for_content_tests",
@ -650,7 +650,7 @@ jumbo_static_library("browsertest_support") {
"//base/test:test_config",
"//base/test:test_support",
"//components/network_session_configurator/common:common",
"//content/app:both_for_content_tests",
"//content/app:for_content_tests",
"//content/browser:for_content_tests",
"//content/shell:content_shell_app",
"//content/shell:content_shell_lib",
@ -666,7 +666,7 @@ jumbo_static_library("browsertest_support") {
]
if (is_android) {
deps += [ "//content/public/app:both" ]
deps += [ "//content/public/app" ]
} else {
deps += [ "//content/public/browser" ]
}
@ -1160,7 +1160,7 @@ test("content_browsertests") {
"//components/url_formatter:url_formatter",
"//components/viz/host",
"//components/viz/test:test_support",
"//content/app:both_for_content_tests",
"//content/app:for_content_tests",
"//content/browser:for_content_tests",
"//content/browser/background_sync:background_sync_proto",
"//content/browser/resources/media:media_internals_resources_grit",
@ -2043,7 +2043,7 @@ test("content_unittests") {
"//components/viz/host",
"//components/viz/service",
"//components/viz/test:test_support",
"//content/app:both_for_content_tests",
"//content/app:for_content_tests",
"//content/browser:for_content_tests",
"//content/browser/background_fetch:background_fetch_proto",
"//content/browser/cache_storage:cache_storage_proto",

@ -150,7 +150,7 @@ fuzzer_test("appcache_fuzzer") {
deps = [
":appcache_fuzzer_proto",
"//base/test:test_support",
"//content/app:both_for_content_tests",
"//content/app:for_content_tests",
"//content/browser:browser",
"//content/public/browser:browser_sources",
"//content/test:test_support",
@ -180,7 +180,7 @@ fuzzer_test("speech_audio_encoder_fuzzer") {
fuzzer_test("browser_accessibility_fuzzer") {
sources = [ "browser_accessibility_fuzzer.cc" ]
deps = [
"//content/app:both_for_content_tests",
"//content/app:for_content_tests",
"//content/browser:browser",
"//content/browser:browser",
"//content/public/browser:browser_sources",

@ -262,7 +262,7 @@ executable("app_shell") {
deps = [
":app_shell_lib",
"//build/win:default_exe_manifest",
"//content/public/app:both",
"//content/public/app",
"//extensions:shell_and_test_pak",
]

@ -78,7 +78,7 @@ component("web_engine_core") {
"//components/media_control/browser",
"//components/media_control/renderer",
"//components/version_info",
"//content/public/app:both",
"//content/public/app",
"//content/public/browser",
"//content/public/child",
"//content/public/common",
@ -202,7 +202,7 @@ executable("web_engine_exe") {
deps = [
":web_engine_core",
"//base",
"//content/public/app:both",
"//content/public/app",
"//services/service_manager/embedder:embedder_switches",
]
sources = [ "web_engine_main.cc" ]

@ -581,7 +581,7 @@ test("headless_unittests") {
"//base/test:test_support",
"//components/security_state/content",
"//components/services/print_compositor/public/mojom",
"//content/public/app:both",
"//content/public/app",
"//content/public/child:child",
"//content/public/common",
"//testing/gmock",
@ -737,7 +737,7 @@ jumbo_static_library("headless_shell_lib") {
"//components/os_crypt",
"//components/security_state/content",
"//components/services/print_compositor/public/mojom",
"//content/public/app:both",
"//content/public/app",
"//content/public/browser",
"//content/public/child:child",
"//content/public/common",

@ -305,7 +305,7 @@ source_set("weblayer_lib_base") {
"//content:content_resources",
"//content:dev_ui_content_resources",
"//content/app/resources",
"//content/public/app:both",
"//content/public/app",
"//content/public/browser",
"//content/public/child",
"//content/public/common",
@ -538,7 +538,7 @@ if (is_android) {
deps = [
":weblayer_lib_webview",
"//base",
"//content/public/app:both",
"//content/public/app",
]
configs -= [ "//build/config/android:hide_all_but_jni_onload" ]
configs += [ "//build/config/android:hide_all_but_jni" ]