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 public_app_shared_sources = [
24 "content_jni_onload.h",
26 "content_main_delegate.cc",
27 "content_main_delegate.h",
28 "content_main_runner.h",
29 "startup_helper_win.h",
32 public_app_shared_deps = [
36 "//content/public/common:common_sources",
39 if (is_component_build) {
40 source_set("both_sources") {
41 # Only the main content shared library can pull this in.
42 visibility = [ "//content:content" ]
44 sources = public_app_shared_sources
46 configs += [ "//content:content_implementation" ]
48 deps = public_app_shared_deps + [
50 "//content/public/browser:browser_sources",
54 # These all just forward to content, which in turn depends on "both_sources".
71 # content_main_delegate.cc conditionally includes content_browser_client.h
72 # from //content/public/browser when it's not the child build. However,
73 # the header checker doesn't know this doesn't apply and throws an error.
74 # So all of these targets set check_includes = false.
76 # TODO(brettw) either teach the header checker to understand simple
77 # ifdefs or split the file apart so we can enable header checking here.
78 # Furthermore, since this file exists in more than one target, they all
79 # have to opt-out of header checking (a file is checked once for all
80 # targets using a source file).
83 check_includes = false # See comment above.
85 sources = public_app_shared_sources
86 configs += [ "//content:content_implementation" ]
87 deps = public_app_shared_deps + [
89 "//content/public/browser",
90 "//content/public/common",
94 # TODO(GYP) enable chrome_multiple_dll support
95 is_chrome_multiple_dll = false
97 if (is_chrome_multiple_dll) {
98 source_set("browser") {
99 check_includes = false # See comment above.
101 sources = public_app_shared_sources
103 defines = [ "CHROME_MULTIPLE_DLL_BROWSER" ]
104 configs += [ "//content:content_implementation" ]
106 deps = public_app_shared_deps + [
107 "//content/app:browser",
108 "//content/public/browser",
109 "//content/public/common",
113 source_set("child") {
114 check_includes = false # See comment above.
116 sources = public_app_shared_sources
118 defines = [ "CHROME_MULTIPLE_DLL_CHILD" ]
119 configs += [ "//content:content_implementation" ]
121 deps = public_app_shared_deps + [
122 "//content/app:child",
123 "//content/public/common",
127 # When the multi-DLL build is disabled, there is only one type of the
128 # "app" target, and "browser" and "child" are the same as "both".