Content "gn check" work.
Make content/gpu and content/plugin pass GN check. Significant work for most of content/test
Makes most of content/shell and content/test pass check. These are not all enabled yet pending a few remaining issues that are more difficult to solve.
The private content targets now allow content/test to include headers from them for non-component builds. Checking is disabled for content/test in component builds as described in the comment at the top of //content/BUILD.gn
Renames the ui/events/ipc according to GN style.
Annotates all content and gpu visibility declarations with why the're there, and fixes some incorrect ones that people added without understanding.
Reland of https://codereview.chromium.org/1828483002/ with significant changes.
TBR=jschuh (non-security-sensitive ipc build changes)
Review URL: https://codereview.chromium.org/1833193002
Cr-Commit-Position: refs/heads/master@{#383358}
diff --git a/content/BUILD.gn b/content/BUILD.gn
index 1d32ad24a..1ece4f9 100644
--- a/content/BUILD.gn
+++ b/content/BUILD.gn
@@ -37,6 +37,23 @@
# //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).
+#
+# TESTS
+# -----
+# Tests are a challenge. The content tests need to access internals of
+# content/browser, for example, but the tests themselves are outside of the
+# content component (which is a shared library in the component build). To
+# prevent external-to-content targets from depending on private headers,
+# the non-public content/browser target is not a public dep of the content
+# component. But this means there is also no public path for the content
+# tests and no way to restrict that just to //content/test/* if we added one.
+#
+# As a result, we check deps for //content/test/* only in non-component builds
+# (which should verify the dependencies are correct for both component and
+# non-component cases equally). There are targets like
+# //content/browser:for_content_tests that allow content/test to depend on the
+# //content/browser target only in non-component builds (when there are no
+# linking problems) for when check is enabled.
if (!is_nacl_nonsfi) {
content_shared_components = [
@@ -99,6 +116,7 @@
# This target exists to "hold" the content_export header so we can do proper
# inclusion testing of it.
source_set("export") {
+ # Must only be used inside of content.
visibility = [ "//content/*" ]
sources = [
"common/content_export.h",