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 "android_library_loader_hooks.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) {
41 source_set("both_sources") {
42 # Only the main content shared library can pull this in.
43 visibility = [ "//content:content" ]
45 sources = public_app_shared_sources
47 configs += [ "//content:content_implementation" ]
49 deps = public_app_shared_deps + [
51 "//content/public/browser:browser_sources",
55 # These all just forward to content, which in turn depends on "both_sources".
57 deps = [ "//content" ]
60 deps = [ "//content" ]
63 deps = [ "//content" ]
68 # content_main_delegate.cc conditionally includes content_browser_client.h
69 # from //content/public/browser when it's not the child build. However,
70 # the header checker doesn't know this doesn't apply and throws an error.
71 # So all of these targets set check_includes = false.
73 # TODO(brettw) either teach the header checker to understand simple
74 # ifdefs or split the file apart so we can enable header checking here.
75 # Furthermore, since this file exists in more than one target, they all
76 # have to opt-out of header checking (a file is checked once for all
77 # targets using a source file).
80 check_includes = false # See comment above.
82 sources = public_app_shared_sources
83 configs += [ "//content:content_implementation" ]
84 deps = public_app_shared_deps + [
86 "//content/public/browser",
87 "//content/public/common",
91 # TODO(GYP) enable chrome_multiple_dll support
92 is_chrome_multiple_dll = false
94 if (is_chrome_multiple_dll) {
95 source_set("browser") {
96 check_includes = false # See comment above.
98 sources = public_app_shared_sources
100 defines = [ "CHROME_MULTIPLE_DLL_BROWSER" ]
101 configs += [ "//content:content_implementation" ]
103 deps = public_app_shared_deps + [
104 "//content/app:browser",
105 "//content/public/browser",
106 "//content/public/common",
110 source_set("child") {
111 check_includes = false # See comment above.
113 sources = public_app_shared_sources
115 defines = [ "CHROME_MULTIPLE_DLL_CHILD" ]
116 configs += [ "//content:content_implementation" ]
118 deps = public_app_shared_deps + [
119 "//content/app:child",
120 "//content/public/common",
124 # When the multi-DLL build is disabled, there is only one type of the
125 # "app" target, and "browser" and "child" are the same as "both".