1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 # App different than the regular content subcomponents (see comments in
6 # //content/BUILD.gn) because it has to support the browser/child process split
7 # (the "both" target include both browser and child process files and is used
10 # In non-component mode, browser, child, and both all follow the same structure:
12 # //content/public/app:child (group) ->
13 # //content/public/app:child_sources (source set) ->
14 # //content/app:child (source set)
16 # In component mode, content is linked as one big turd so there is only one
17 # app target containing sources ("both") and the other ones forward to it:
19 # //content/public/app:child (group; "browser" and "both" ones look the same)
20 # //content (shared library) ->
21 # //content/public/app:both_sources (source set)
23 import("//build/config/chrome_build.gni")
25 public_app_shared_sources = [
26 "content_jni_onload.h",
28 "content_main_delegate.cc",
29 "content_main_delegate.h",
30 "content_main_runner.h",
31 "startup_helper_win.h",
34 public_app_shared_deps = [
38 "//content/public/common:common_sources",
41 if (is_component_build) {
42 source_set("both_sources") {
43 # Only the main content shared library can pull this in.
44 visibility = [ "//content:content" ]
46 sources = public_app_shared_sources
48 configs += [ "//content:content_implementation" ]
50 deps = public_app_shared_deps + [
52 "//content/public/browser:browser_sources",
56 # These all just forward to content, which in turn depends on "both_sources".
73 # content_main_delegate.cc conditionally includes content_browser_client.h
74 # from //content/public/browser when it's not the child build. However,
75 # the header checker doesn't know this doesn't apply and throws an error.
76 # So all of these targets set check_includes = false.
78 # TODO(brettw) either teach the header checker to understand simple
79 # ifdefs or split the file apart so we can enable header checking here.
80 # Furthermore, since this file exists in more than one target, they all
81 # have to opt-out of header checking (a file is checked once for all
82 # targets using a source file).
85 check_includes = false # See comment above.
87 sources = public_app_shared_sources
88 configs += [ "//content:content_implementation" ]
89 deps = public_app_shared_deps + [
91 "//content/public/browser",
92 "//content/public/common",
96 if (is_multi_dll_chrome) {
97 source_set("browser") {
98 check_includes = false # See comment above.
100 sources = public_app_shared_sources
102 defines = [ "CHROME_MULTIPLE_DLL_BROWSER" ]
103 configs += [ "//content:content_implementation" ]
105 deps = public_app_shared_deps + [
106 "//content/app:browser",
107 "//content/public/browser",
108 "//content/public/common",
112 source_set("child") {
113 check_includes = false # See comment above.
115 sources = public_app_shared_sources
117 defines = [ "CHROME_MULTIPLE_DLL_CHILD" ]
118 configs += [ "//content:content_implementation" ]
120 deps = public_app_shared_deps + [
121 "//content/app:child",
122 "//content/public/common",
126 # When the multi-DLL build is disabled, there is only one type of the
127 # "app" target, and "browser" and "child" are the same as "both".