Commit 8f132304 authored by Brett Wilson's avatar Brett Wilson

Make chrome GN build work in component mode.

This also fixes a resources regression (added extensions resources) that caused chrome not to run.

R=jamesr@chromium.org

Review URL: https://codereview.chromium.org/554393009

Cr-Commit-Position: refs/heads/master@{#294406}
parent 36e91cd9
...@@ -173,12 +173,12 @@ shared_library("main_dll") { ...@@ -173,12 +173,12 @@ shared_library("main_dll") {
if (false) { #chrome_multiple_dll) { if (false) { #chrome_multiple_dll) {
defines = [ "CHROME_MULTIPLE_DLL_BROWSER" ] defines = [ "CHROME_MULTIPLE_DLL_BROWSER" ]
deps += [ deps += [
"//content/app:browser", "//content/public/app:browser",
] ]
} else { } else {
deps += [ deps += [
":child_dependencies", ":child_dependencies",
"//content/app:both", "//content/public/app:both",
] ]
} }
...@@ -230,8 +230,7 @@ group("child_dependencies") { ...@@ -230,8 +230,7 @@ group("child_dependencies") {
"//chrome/plugin", "//chrome/plugin",
"//chrome/renderer", "//chrome/renderer",
"//chrome/utility", "//chrome/utility",
"//content/gpu", "//content/public/child",
"//content/ppapi_plugin",
"//third_party/WebKit/public:blink_devtools_frontend_resources", "//third_party/WebKit/public:blink_devtools_frontend_resources",
] ]
} }
...@@ -481,6 +480,11 @@ template("chrome_repack_percent") { ...@@ -481,6 +480,11 @@ template("chrome_repack_percent") {
] ]
deps += [ "//ui/chromeos/resources" ] deps += [ "//ui/chromeos/resources" ]
} }
if (enable_extensions) {
sources += [
"$root_gen_dir/extensions/extensions_browser_resources_${percent}_percent.pak",
]
}
output = repack_output_file output = repack_output_file
} }
......
...@@ -92,6 +92,7 @@ static_library("browser") { ...@@ -92,6 +92,7 @@ static_library("browser") {
"//courgette:courgette_lib", "//courgette:courgette_lib",
"//crypto", "//crypto",
"//google_apis", "//google_apis",
"//gpu/config",
"//jingle:notifier", "//jingle:notifier",
"//skia", "//skia",
"//sql", "//sql",
......
...@@ -9,16 +9,43 @@ config("content_implementation") { ...@@ -9,16 +9,43 @@ config("content_implementation") {
defines = [ "CONTENT_IMPLEMENTATION" ] defines = [ "CONTENT_IMPLEMENTATION" ]
} }
# When targets depend on, e.g. //content/public/browser, what happens? To
# facilitate the complexity here, the "public" targets are groups that forward
# to the right thing depending on the build mode. Say for additional
# illustration, the public browser sources also depend on the public common
# ones.
#
# The non-component build is easy:
# foo ->
# //content/public/browser (group) ->
# //content/public/browser:browser_sources (source set) ->
# //content/browser (source set, this is the non-public browser target)
# //content/public/common:common_sources (source set)
#
# The component build is more complicated because we want everybody to depend on
# one content shared library regardless of which public target they depend on:
# foo ->
# //content/public/browser (group) ->
# //content (shared library) ->
# //content/public/browser:browser_sources (source set) ->
# //content/browser (source set; this is the non-public browser target)
# //content/public/common:common_sources (source set)
#
# That the internal content dependencies must depend on the *_sources targets
# to avoid dependency cycles, and external dependencies must depend on the
# //content/public/browser and similar targets to avoid double-linking (these
# targets make sure the dependency goes through the content shared library
# when doing a component build).
content_shared_components = [ content_shared_components = [
"//content/gpu", "//content/gpu",
"//content/plugin", "//content/plugin",
"//content/public/browser:browser_sources", "//content/public/browser:browser_sources",
"//content/public/child", "//content/public/child:child_sources",
"//content/public/common", "//content/public/common:common_sources",
"//content/public/plugin", "//content/public/plugin:plugin_sources",
"//content/public/renderer", "//content/public/renderer:renderer_sources",
"//content/public/utility", "//content/public/utility:utility_sources",
"//content/renderer",
] ]
if (enable_plugins) { if (enable_plugins) {
...@@ -28,8 +55,7 @@ if (enable_plugins) { ...@@ -28,8 +55,7 @@ if (enable_plugins) {
if (is_component_build) { if (is_component_build) {
shared_library("content") { shared_library("content") {
deps = content_shared_components + [ deps = content_shared_components + [
"//content/app", "//content/public/app:both_sources",
"//content/public/app",
] ]
forward_dependent_configs_from = deps forward_dependent_configs_from = deps
} }
......
...@@ -25,7 +25,7 @@ content_app_deps = [ ...@@ -25,7 +25,7 @@ content_app_deps = [
# picking the allocator. # picking the allocator.
"//base/allocator", "//base/allocator",
"//content:export", "//content:export",
"//content/public/common", "//content/public/common:common_sources",
"//crypto", "//crypto",
"//ui/base", "//ui/base",
"//ui/gfx", "//ui/gfx",
...@@ -63,55 +63,41 @@ content_app_extra_configs = [ ...@@ -63,55 +63,41 @@ content_app_extra_configs = [
"//content:content_implementation", "//content:content_implementation",
] ]
if (is_component_build) { # This includes the app sources for both the browser and child processes.
source_set("app") { source_set("both") {
# Only the public target should depend on this. All other targets (even
# internal content ones) should depend on the public one.
visibility = [ "//content/public/app:*" ]
sources = content_app_sources sources = content_app_sources
configs += content_app_extra_configs configs += content_app_extra_configs
deps = content_app_deps deps = content_app_deps
} }
# In the component build, all of these app targets redirect to the content # TODO(GYP) enable chrome_multiple_dll support
# component. The content component in turn references the "app" target above. is_chrome_multiple_dll = false
group("browser") {
deps = [ "//content" ]
}
group("child") {
deps = [ "//content" ]
}
group("both") {
deps = [ "//content" ]
}
} else {
# Non-component build. In this case, we have different versions of
# "content/app" for the browser and child process.
# TODO(GYP) enable chrome_multiple_dll support if (is_chrome_multiple_dll) {
is_chrome_multiple_dll = false # It doesn't make sense to do the browser/child dll split in component mode.
assert(!is_component_build)
source_set("browser") { source_set("browser") {
visibility = [ "//content/public/app:browser" ]
sources = content_app_sources sources = content_app_sources
configs += content_app_extra_configs configs += content_app_extra_configs
deps = content_app_deps deps = content_app_deps
if (is_chrome_multiple_dll) {
defines += [ "CHROME_MULTIPLE_DLL_BROWSER" ] defines += [ "CHROME_MULTIPLE_DLL_BROWSER" ]
} }
}
source_set("child") { source_set("child") {
visibility = [ "//content/public/app:child" ]
sources = content_app_sources sources = content_app_sources
configs += content_app_extra_configs configs += content_app_extra_configs
deps = content_app_deps deps = content_app_deps
if (is_chrome_multiple_dll) {
defines += [ "CHROME_MULTIPLE_DLL_CHILD" ] defines += [ "CHROME_MULTIPLE_DLL_CHILD" ]
} }
}
# Includes both browser and child process app sources.
source_set("both") {
sources = content_app_sources
configs += content_app_extra_configs
deps = content_app_deps
}
} }
...@@ -6,15 +6,10 @@ import("//build/config/features.gni") ...@@ -6,15 +6,10 @@ import("//build/config/features.gni")
import("//build/config/ui.gni") import("//build/config/ui.gni")
import("//content/browser/browser.gni") import("//content/browser/browser.gni")
config("storage_config") {
if (is_android) {
defines = [ "APPCACHE_USE_SIMPLE_CACHE" ]
}
}
source_set("browser") { source_set("browser") {
# Only targets in the content tree can depend directly on this target. # Only the public target should depend on this. All other targets (even
visibility = [ "//content/*" ] # internal content ones) should depend on the public one.
visibility = [ "//content/public/browser:browser_sources" ]
defines = [] defines = []
libs = [] libs = []
...@@ -27,7 +22,7 @@ source_set("browser") { ...@@ -27,7 +22,7 @@ source_set("browser") {
"//content:resources", "//content:resources",
"//content/browser/service_worker:proto", "//content/browser/service_worker:proto",
"//content/browser/speech/proto", "//content/browser/speech/proto",
"//content/public/common", "//content/public/common:common_sources",
"//crypto", "//crypto",
"//google_apis", "//google_apis",
"//net", "//net",
......
...@@ -8,8 +8,9 @@ import("//build/config/ui.gni") ...@@ -8,8 +8,9 @@ import("//build/config/ui.gni")
import("//content/child/child.gni") import("//content/child/child.gni")
source_set("child") { source_set("child") {
# Only targets in the content tree can depend directly on this target. # Only the public target should depend on this. All other targets (even
visibility = [ "//content/*" ] # internal content ones) should depend on the public one.
visibility = [ "//content/public/child:child_sources" ]
sources = rebase_path(content_child_gypi_values.private_child_sources, sources = rebase_path(content_child_gypi_values.private_child_sources,
".", "//content") ".", "//content")
......
...@@ -8,8 +8,9 @@ import("//content/common/common.gni") ...@@ -8,8 +8,9 @@ import("//content/common/common.gni")
import("//mojo/public/tools/bindings/mojom.gni") import("//mojo/public/tools/bindings/mojom.gni")
source_set("common") { source_set("common") {
# Only targets in the content tree can depend directly on this target. # Only the public target should depend on this. All other targets (even
visibility = [ "//content/*" ] # internal content ones) should depend on the public one.
visibility = [ "//content/public/common:common_sources" ]
sources = rebase_path(content_common_gypi_values.private_common_sources, sources = rebase_path(content_common_gypi_values.private_common_sources,
".", "//content") ".", "//content")
...@@ -51,6 +52,7 @@ source_set("common") { ...@@ -51,6 +52,7 @@ source_set("common") {
# content and moved to android_webview. See crbug.com/365797. # content and moved to android_webview. See crbug.com/365797.
"//gpu/command_buffer/client:gl_in_process_context", "//gpu/command_buffer/client:gl_in_process_context",
"//gpu/command_buffer/client:gles2_c_lib", "//gpu/command_buffer/client:gles2_c_lib",
"//gpu/command_buffer/client:gles2_cmd_helper",
"//gpu/command_buffer/client:gles2_implementation", "//gpu/command_buffer/client:gles2_implementation",
"//gpu/command_buffer/service", "//gpu/command_buffer/service",
"//gpu/ipc", "//gpu/ipc",
......
...@@ -6,9 +6,7 @@ import("//build/config/ui.gni") ...@@ -6,9 +6,7 @@ import("//build/config/ui.gni")
import("//content/content.gni") import("//content/content.gni")
source_set("gpu") { source_set("gpu") {
# TODO(brettw) it seems like this should be only visible to content like visibility = [ "//content/*" ]
# the other non-public content directories are. But this is depended on by
# the chrome target.
sources = [ sources = [
"gpu_main.cc", "gpu_main.cc",
......
...@@ -7,7 +7,10 @@ import("//build/config/features.gni") ...@@ -7,7 +7,10 @@ import("//build/config/features.gni")
# This is the NPAPI plugin process. It isn't used on Linux. # This is the NPAPI plugin process. It isn't used on Linux.
if (enable_plugins && !is_linux) { if (enable_plugins && !is_linux) {
source_set("plugin") { source_set("plugin") {
visibility = [ "//content/*" ] # Only the public target should depend on this. All other targets (even
# internal content ones) should depend on the public one.
visibility = [ "//content/public/plugin:plugin_sources" ]
sources = [ sources = [
"plugin_channel.cc", "plugin_channel.cc",
"plugin_channel.h", "plugin_channel.h",
......
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
# found in the LICENSE file. # found in the LICENSE file.
source_set("ppapi_plugin") { source_set("ppapi_plugin") {
visibility = [ "//content/*" ]
sources = [ sources = [
"broker_process_dispatcher.cc", "broker_process_dispatcher.cc",
"broker_process_dispatcher.h", "broker_process_dispatcher.h",
...@@ -21,6 +23,8 @@ source_set("ppapi_plugin") { ...@@ -21,6 +23,8 @@ source_set("ppapi_plugin") {
deps = [ deps = [
"//base", "//base",
"//content:export", "//content:export",
"//content/public/child:child_sources",
"//content/public/common:common_sources",
"//mojo/public/interfaces/application", "//mojo/public/interfaces/application",
"//ppapi:ppapi_ipc", "//ppapi:ppapi_ipc",
"//skia", "//skia",
......
...@@ -2,47 +2,57 @@ ...@@ -2,47 +2,57 @@
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
# Used internally to hold the sources shared between the various targets below. # App different than the regular content subcomponents (see comments in
source_set("app_shared_sources") { # //content/BUILD.gn) because it has to support the browser/child process split
# content_main_delegate.cc has ifdefs that depend on whether the file is # (the "both" target include both browser and child process files and is used
# being used in the context of the browser or child process. So that file has # for testing).
# to be included in the per-type targets below rather than in this shared one. #
sources = [ # In non-component mode, browser, child, and both all follow the same structure:
# foo ->
# //content/public/app:child (group) ->
# //content/public/app:child_sources (source set) ->
# //content/app:child (source set)
# In component mode, content is linked as one big turd so there is only one
# app target containing sources ("both") and the other ones forward to it:
# foo ->
# //content/public/app:child (group; "browser" and "both" ones look the same)
# //content (shared library) ->
# //content/public/app:both_sources (source set)
public_app_shared_sources = [
"android_library_loader_hooks.h", "android_library_loader_hooks.h",
"content_main.h", "content_main.h",
"content_main_delegate.cc",
"content_main_delegate.h",
"content_main_runner.h", "content_main_runner.h",
"startup_helper_win.h", "startup_helper_win.h",
] ]
configs += [ "//content:content_implementation" ] public_app_shared_deps = [
deps = [
"//base", "//base",
"//base:i18n", "//base:i18n",
"//content:export", "//content:export",
"//content/common", "//content/public/common:common_sources",
"//content/public/plugin", ]
"//content/public/renderer",
"//content/public/utility",
]
}
# The structure of this is like the private content/app implementation.
if (is_component_build) { if (is_component_build) {
source_set("app") { source_set("both_sources") {
sources = [ # Only the main content shared library can pull this in.
"content_main_delegate.cc", visibility = [ "//content:content" ]
"content_main_delegate.h",
]
deps = [ sources = public_app_shared_sources
":app_shared_sources",
"//content/app", configs += [ "//content:content_implementation" ]
"//content/common",
"//content/public/browser", deps = public_app_shared_deps + [
"//content/app:both",
"//content/public/browser:browser_sources",
] ]
} }
# These all just forward to content, which in turn depends on "both_sources".
group("browser") { group("browser") {
deps = [ "//content" ] deps = [ "//content" ]
} }
...@@ -55,55 +65,70 @@ if (is_component_build) { ...@@ -55,55 +65,70 @@ if (is_component_build) {
} else { } else {
source_set("browser") {
# See comment in "child" target.
check_includes = false
sources = [
"content_main_delegate.cc",
"content_main_delegate.h",
]
deps = [
":app_shared_sources",
"//content/app:browser",
"//content/public/browser",
"//content/public/common",
]
}
source_set("child") {
# content_main_delegate.cc conditionally includes content_browser_client.h # content_main_delegate.cc conditionally includes content_browser_client.h
# from //content/public/browser when it's not the child build. However, # 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. # 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 # TODO(brettw) either teach the header checker to understand simple
# ifdefs or split the file apart so we can enable header checking here. # 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 # 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 # have to opt-out of header checking (a file is checked once for all
# targets using a source file). # targets using a source file).
check_includes = false
sources = [ source_set("both") {
"content_main_delegate.cc", check_includes = false # See comment above.
"content_main_delegate.h",
] sources = public_app_shared_sources
deps = [ configs += [ "//content:content_implementation" ]
":app_shared_sources", deps = public_app_shared_deps + [
"//content/app:child", "//content/app:both",
"//content/public/browser",
"//content/public/common", "//content/public/common",
] ]
} }
source_set("both") {
# See comment in "child" target. # TODO(GYP) enable chrome_multiple_dll support
check_includes = false is_chrome_multiple_dll = false
sources = [
"content_main_delegate.cc", if (is_chrome_multiple_dll) {
"content_main_delegate.h", source_set("browser") {
] check_includes = false # See comment above.
deps = [
":app_shared_sources", sources = public_app_shared_sources
"//content/app:both",
defines = [ "CHROME_MULTIPLE_DLL_BROWSER" ]
configs += [ "//content:content_implementation" ]
deps = public_app_shared_deps + [
"//content/app:browser",
"//content/public/browser", "//content/public/browser",
"//content/public/common", "//content/public/common",
] ]
} }
source_set("child") {
check_includes = false # See comment above.
sources = public_app_shared_sources
defines = [ "CHROME_MULTIPLE_DLL_CHILD" ]
configs += [ "//content:content_implementation" ]
deps = public_app_shared_deps + [
"//content/app:child",
"//content/public/common",
]
}
} else {
# 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".
group("browser") {
deps = [ ":both" ]
}
group("child") {
deps = [ ":both" ]
}
}
} }
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
import("//content/browser/browser.gni") import("//content/browser/browser.gni")
import("//build/config/ui.gni") import("//build/config/ui.gni")
# See //content/BUILD.gn for how this works.
group("browser") { group("browser") {
if (is_component_build) { if (is_component_build) {
deps = [ "//content" ] deps = [ "//content" ]
...@@ -15,6 +16,8 @@ group("browser") { ...@@ -15,6 +16,8 @@ group("browser") {
} }
source_set("browser_sources") { source_set("browser_sources") {
visibility = [ "//content/*" ]
if (is_ios) { if (is_ios) {
# iOS doesn't get the normal file list and only takes these whitelisted # iOS doesn't get the normal file list and only takes these whitelisted
# files. # files.
...@@ -40,7 +43,7 @@ source_set("browser_sources") { ...@@ -40,7 +43,7 @@ source_set("browser_sources") {
deps = [ deps = [
"//content/browser", "//content/browser",
"//content/public/common", "//content/public/common:common_sources",
"//net", "//net",
"//skia", "//skia",
"//ui/accessibility", "//ui/accessibility",
...@@ -51,7 +54,8 @@ source_set("browser_sources") { ...@@ -51,7 +54,8 @@ source_set("browser_sources") {
allow_circular_includes_from = [ allow_circular_includes_from = [
# This target is a pair with content/browser. They always go together and # This target is a pair with content/browser. They always go together and
# include headers from each other. # include headers from each other.
"//content/browser", # TODO(brettw) enable this when this permits non-dependent targets.
#"//content/browser",
] ]
# We expose skia headers in the public API. # We expose skia headers in the public API.
......
...@@ -4,7 +4,19 @@ ...@@ -4,7 +4,19 @@
import("//content/child/child.gni") import("//content/child/child.gni")
source_set("child") { # See //content/BUILD.gn for how this works.
group("child") {
if (is_component_build) {
deps = [ "//content" ]
} else {
deps = [ ":child_sources" ]
}
forward_dependent_configs_from = deps
}
source_set("child_sources") {
visibility = [ "//content/*" ]
sources = rebase_path(content_child_gypi_values.public_child_sources, sources = rebase_path(content_child_gypi_values.public_child_sources,
".", "//content") ".", "//content")
...@@ -14,6 +26,6 @@ source_set("child") { ...@@ -14,6 +26,6 @@ source_set("child") {
deps = [ deps = [
"//content/child", "//content/child",
"//content/public/common", "//content/public/common:common_sources",
] ]
} }
...@@ -5,7 +5,19 @@ ...@@ -5,7 +5,19 @@
import("//build/config/features.gni") import("//build/config/features.gni")
import("//content/common/common.gni") import("//content/common/common.gni")
source_set("common") { # See //content/BUILD.gn for how this works.
group("common") {
if (is_component_build) {
deps = [ "//content" ]
} else {
deps = [ ":common_sources" ]
}
forward_dependent_configs_from = deps
}
source_set("common_sources") {
visibility = [ "//content/*" ]
sources = rebase_path(content_common_gypi_values.public_common_sources, sources = rebase_path(content_common_gypi_values.public_common_sources,
".", "//content") ".", "//content")
......
...@@ -2,7 +2,19 @@ ...@@ -2,7 +2,19 @@
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
source_set("plugin") { # See //content/BUILD.gn for how this works.
group("plugin") {
if (is_component_build) {
deps = [ "//content" ]
} else {
deps = [ ":plugin_sources" ]
}
forward_dependent_configs_from = deps
}
source_set("plugin_sources") {
visibility = [ "//content/*" ]
sources = [ sources = [
"content_plugin_client.h", "content_plugin_client.h",
] ]
...@@ -10,6 +22,6 @@ source_set("plugin") { ...@@ -10,6 +22,6 @@ source_set("plugin") {
deps = [ deps = [
"//base", "//base",
"//content/plugin", "//content/plugin",
"//content/public/common", "//content/public/common:common_sources",
] ]
} }
...@@ -5,7 +5,19 @@ ...@@ -5,7 +5,19 @@
import("//build/config/features.gni") import("//build/config/features.gni")
import("//content/renderer/renderer.gni") import("//content/renderer/renderer.gni")
source_set("renderer") { # See //content/BUILD.gn for how this works.
group("renderer") {
if (is_component_build) {
deps = [ "//content" ]
} else {
deps = [ ":renderer_sources" ]
}
forward_dependent_configs_from = deps
}
source_set("renderer_sources") {
visibility = [ "//content/*" ]
sources = rebase_path(content_renderer_gypi_values.public_renderer_sources, sources = rebase_path(content_renderer_gypi_values.public_renderer_sources,
".", "//content") ".", "//content")
...@@ -14,7 +26,7 @@ source_set("renderer") { ...@@ -14,7 +26,7 @@ source_set("renderer") {
] ]
deps = [ deps = [
"//content/public/common", "//content/public/common:common_sources",
"//content/renderer", "//content/renderer",
"//skia", "//skia",
"//third_party/libjingle", "//third_party/libjingle",
...@@ -27,7 +39,8 @@ source_set("renderer") { ...@@ -27,7 +39,8 @@ source_set("renderer") {
allow_circular_includes_from = [ allow_circular_includes_from = [
# This target is a pair with content/renderer. They always go together and # This target is a pair with content/renderer. They always go together and
# include headers from each other. # include headers from each other.
"//content/renderer", # TODO(brettw) enable this when this permits non-dependent targets.
#"//content/renderer",
] ]
if (enable_webrtc) { if (enable_webrtc) {
......
...@@ -2,7 +2,19 @@ ...@@ -2,7 +2,19 @@
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
source_set("utility") { # See //content/BUILD.gn for how this works.
group("utility") {
if (is_component_build) {
deps = [ "//content" ]
} else {
deps = [ ":utility_sources" ]
}
forward_dependent_configs_from = deps
}
source_set("utility_sources") {
visibility = [ "//content/*" ]
sources = [ sources = [
"content_utility_client.cc", "content_utility_client.cc",
"content_utility_client.h", "content_utility_client.h",
...@@ -15,7 +27,7 @@ source_set("utility") { ...@@ -15,7 +27,7 @@ source_set("utility") {
deps = [ deps = [
"//base", "//base",
"//content:export", "//content:export",
"//content/public/common", "//content/public/common:common_sources",
"//content/utility", "//content/utility",
"//ipc", "//ipc",
] ]
...@@ -23,7 +35,8 @@ source_set("utility") { ...@@ -23,7 +35,8 @@ source_set("utility") {
allow_circular_includes_from = [ allow_circular_includes_from = [
# This target is a pair with content/browser. They always go together and # This target is a pair with content/browser. They always go together and
# include headers from each other. # include headers from each other.
"//content/utility", # TODO(brettw) enable this when this permits non-dependent targets.
#"//content/utility",
] ]
} }
...@@ -7,8 +7,9 @@ import("//build/config/ui.gni") ...@@ -7,8 +7,9 @@ import("//build/config/ui.gni")
import("//content/renderer/renderer.gni") import("//content/renderer/renderer.gni")
source_set("renderer") { source_set("renderer") {
# Only targets in the content tree can depend directly on this target. # Only the public target should depend on this. All other targets (even
visibility = [ "//content/*" ] # internal content ones) should depend on the public one.
visibility = [ "//content/public/renderer:renderer_sources" ]
sources = rebase_path(content_renderer_gypi_values.private_renderer_sources, sources = rebase_path(content_renderer_gypi_values.private_renderer_sources,
".", "//content") ".", "//content")
...@@ -26,10 +27,9 @@ source_set("renderer") { ...@@ -26,10 +27,9 @@ source_set("renderer") {
"//cc", "//cc",
"//cc/blink", "//cc/blink",
"//content:resources", "//content:resources",
"//content/public/child",
"//content/common:mojo_bindings", "//content/common:mojo_bindings",
"//content/public/child", "//content/public/child:child_sources",
"//content/public/common", "//content/public/common:common_sources",
"//gin", "//gin",
"//gpu", "//gpu",
"//jingle:jingle_glue", "//jingle:jingle_glue",
......
...@@ -210,10 +210,10 @@ static_library("content_shell_lib") { ...@@ -210,10 +210,10 @@ static_library("content_shell_lib") {
"//cc", "//cc",
"//components/crash/app", "//components/crash/app",
"//content:resources", "//content:resources",
"//content/app:both",
"//content/app/resources", "//content/app/resources",
"//content/app/strings", "//content/app/strings",
"//content/gpu", "//content/gpu",
"//content/public/app:both",
"//content/public/browser", "//content/public/browser",
"//content/public/common", "//content/public/common",
"//content/public/plugin", "//content/public/plugin",
......
...@@ -18,8 +18,8 @@ static_library("test_support") { ...@@ -18,8 +18,8 @@ static_library("test_support") {
deps = [ deps = [
"//cc/blink", "//cc/blink",
"//content/public/app:both", "//content/public/app:both",
"//content/public/browser", "//content/public/browser:browser_sources",
"//content/public/common", "//content/public/common:common_sources",
"//net:test_support", "//net:test_support",
"//skia", "//skia",
"//storage/common", "//storage/common",
...@@ -44,10 +44,10 @@ static_library("test_support") { ...@@ -44,10 +44,10 @@ static_library("test_support") {
deps += [ deps += [
"//content/browser/speech/proto", "//content/browser/speech/proto",
"//content/child", "//content/public/child:child_sources",
"//content/gpu", "//content/gpu",
"//content/public/renderer", "//content/public/renderer:renderer_sources",
"//content/public/utility", "//content/public/utility:utility_sources",
"//cc", "//cc",
"//cc:test_support", "//cc:test_support",
"//media", "//media",
......
...@@ -3,6 +3,10 @@ ...@@ -3,6 +3,10 @@
# found in the LICENSE file. # found in the LICENSE file.
source_set("utility") { source_set("utility") {
# Only the public target should depend on this. All other targets (even
# internal content ones) should depend on the public one.
visibility = [ "//content/public/utility:utility_sources" ]
sources = [ sources = [
"in_process_utility_thread.cc", "in_process_utility_thread.cc",
"in_process_utility_thread.h", "in_process_utility_thread.h",
...@@ -16,8 +20,8 @@ source_set("utility") { ...@@ -16,8 +20,8 @@ source_set("utility") {
deps = [ deps = [
"//base", "//base",
"//content:export", "//content:export",
"//content/public/child", "//content/public/child:child_sources",
"//content/public/common", "//content/public/common:common_sources",
"//courgette:courgette_lib", "//courgette:courgette_lib",
"//mojo/public/interfaces/application", "//mojo/public/interfaces/application",
"//third_party/WebKit/public:blink_headers", "//third_party/WebKit/public:blink_headers",
......
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