| Index: content/public/app/BUILD.gn
|
| diff --git a/content/public/app/BUILD.gn b/content/public/app/BUILD.gn
|
| index bcced872b0d273dfbea7331247d78064584c8822..ccb31698574d5a33f850e85d5488c8803cc27704 100644
|
| --- a/content/public/app/BUILD.gn
|
| +++ b/content/public/app/BUILD.gn
|
| @@ -2,47 +2,57 @@
|
| # Use of this source code is governed by a BSD-style license that can be
|
| # found in the LICENSE file.
|
|
|
| -# Used internally to hold the sources shared between the various targets below.
|
| -source_set("app_shared_sources") {
|
| - # content_main_delegate.cc has ifdefs that depend on whether the file is
|
| - # being used in the context of the browser or child process. So that file has
|
| - # to be included in the per-type targets below rather than in this shared one.
|
| - sources = [
|
| - "android_library_loader_hooks.h",
|
| - "content_main.h",
|
| - "content_main_runner.h",
|
| - "startup_helper_win.h",
|
| - ]
|
| -
|
| - configs += [ "//content:content_implementation" ]
|
| -
|
| - deps = [
|
| - "//base",
|
| - "//base:i18n",
|
| - "//content:export",
|
| - "//content/common",
|
| - "//content/public/plugin",
|
| - "//content/public/renderer",
|
| - "//content/public/utility",
|
| - ]
|
| -}
|
| +# App different than the regular content subcomponents (see comments in
|
| +# //content/BUILD.gn) because it has to support the browser/child process split
|
| +# (the "both" target include both browser and child process files and is used
|
| +# for testing).
|
| +#
|
| +# 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",
|
| + "content_main.h",
|
| + "content_main_delegate.cc",
|
| + "content_main_delegate.h",
|
| + "content_main_runner.h",
|
| + "startup_helper_win.h",
|
| +]
|
| +
|
| +public_app_shared_deps = [
|
| + "//base",
|
| + "//base:i18n",
|
| + "//content:export",
|
| + "//content/public/common:common_sources",
|
| +]
|
|
|
| -# The structure of this is like the private content/app implementation.
|
| if (is_component_build) {
|
|
|
| - source_set("app") {
|
| - sources = [
|
| - "content_main_delegate.cc",
|
| - "content_main_delegate.h",
|
| - ]
|
| + source_set("both_sources") {
|
| + # Only the main content shared library can pull this in.
|
| + visibility = [ "//content:content" ]
|
|
|
| - deps = [
|
| - ":app_shared_sources",
|
| - "//content/app",
|
| - "//content/common",
|
| - "//content/public/browser",
|
| + sources = public_app_shared_sources
|
| +
|
| + configs += [ "//content:content_implementation" ]
|
| +
|
| + 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") {
|
| deps = [ "//content" ]
|
| }
|
| @@ -55,55 +65,70 @@ if (is_component_build) {
|
|
|
| } 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
|
| - # 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.
|
| - #
|
| - # 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).
|
| - check_includes = false
|
| -
|
| - sources = [
|
| - "content_main_delegate.cc",
|
| - "content_main_delegate.h",
|
| - ]
|
| - deps = [
|
| - ":app_shared_sources",
|
| - "//content/app:child",
|
| - "//content/public/common",
|
| - ]
|
| - }
|
| + # 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") {
|
| - # See comment in "child" target.
|
| - check_includes = false
|
| - sources = [
|
| - "content_main_delegate.cc",
|
| - "content_main_delegate.h",
|
| - ]
|
| - deps = [
|
| - ":app_shared_sources",
|
| + check_includes = false # See comment above.
|
| +
|
| + sources = public_app_shared_sources
|
| + configs += [ "//content:content_implementation" ]
|
| + deps = public_app_shared_deps + [
|
| "//content/app:both",
|
| "//content/public/browser",
|
| "//content/public/common",
|
| ]
|
| }
|
|
|
| + # TODO(GYP) enable chrome_multiple_dll support
|
| + is_chrome_multiple_dll = false
|
| +
|
| + if (is_chrome_multiple_dll) {
|
| + source_set("browser") {
|
| + check_includes = false # See comment above.
|
| +
|
| + sources = public_app_shared_sources
|
| +
|
| + defines = [ "CHROME_MULTIPLE_DLL_BROWSER" ]
|
| + configs += [ "//content:content_implementation" ]
|
| +
|
| + deps = public_app_shared_deps + [
|
| + "//content/app:browser",
|
| + "//content/public/browser",
|
| + "//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" ]
|
| + }
|
| + }
|
| +
|
| }
|
|
|