Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(537)

Side by Side Diff: content/app/BUILD.gn

Issue 2696953002: Fix missing dependencies in content/app. (Closed)
Patch Set: fix android Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | content/app/content_main_runner.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 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 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("//build/config/chrome_build.gni") 5 import("//build/config/chrome_build.gni")
6 import("//build/config/features.gni") 6 import("//build/config/features.gni")
7 import("//ppapi/features/features.gni") 7 import("//ppapi/features/features.gni")
8 8
9 # Implements "content_main" given the defines and visibility. On Windows this 9 # Implements "content_main" given the defines and visibility. On Windows this
10 # is compiled with a different define for browser and child, but all code needs 10 # is compiled with a different define for browser and child, but all code needs
(...skipping 12 matching lines...) Expand all
23 "//base", 23 "//base",
24 "//base:i18n", 24 "//base:i18n",
25 "//components/tracing:startup_tracing", 25 "//components/tracing:startup_tracing",
26 "//content:export", 26 "//content:export",
27 "//content:sandbox_helper_win", 27 "//content:sandbox_helper_win",
28 "//content/public/common:common_sources", 28 "//content/public/common:common_sources",
29 "//crypto", 29 "//crypto",
30 "//services/service_manager/public/interfaces", 30 "//services/service_manager/public/interfaces",
31 "//mojo/edk/system", 31 "//mojo/edk/system",
32 "//ppapi/features", 32 "//ppapi/features",
33 "//third_party/WebKit/public:mojo_bindings",
34 "//ui/base", 33 "//ui/base",
35 "//ui/gfx", 34 "//ui/gfx",
36 "//ui/gfx/geometry", 35 "//ui/gfx/geometry",
37 ] 36 ]
38 37
39 if (is_win) { 38 if (is_win) {
40 content_app_deps += [ "//sandbox" ] 39 content_app_deps += [ "//sandbox" ]
41 } else if (is_android) { 40 } else if (is_android) {
42 # Android doesn't use the browser/child split and in the component build 41 # Android doesn't use the browser/child split and in the component build
43 # all symbols are exported from the .so, so the Android-specific files 42 # all symbols are exported from the .so, so the Android-specific files
44 # can include headers from both places. Many of these are required for 43 # can include headers from both places. Many of these are required for
45 # JNI registration. 44 # JNI registration.
46 content_app_deps += [ 45 content_app_deps += [
47 "//content/browser", 46 "//content/browser",
48 "//content/child", 47 "//content/child",
49 "//content/public/android:jni", 48 "//content/public/android:jni",
50 "//content/browser",
51 "//content/child",
52 "//device/bluetooth", 49 "//device/bluetooth",
53 "//device/gamepad", 50 "//device/gamepad",
54 "//device/generic_sensor", 51 "//device/generic_sensor",
55 "//device/geolocation", 52 "//device/geolocation",
56 "//device/power_save_blocker", 53 "//device/power_save_blocker",
57 "//device/sensors", 54 "//device/sensors",
58 "//device/time_zone_monitor", 55 "//device/time_zone_monitor",
59 "//device/usb", 56 "//device/usb",
60 "//device/vibration", 57 "//device/vibration",
61 "//gpu", 58 "//gpu",
62 "//media", 59 "//media",
63 "//media/capture", 60 "//media/capture",
64 "//media/midi", 61 "//media/midi",
65 "//net", 62 "//net",
66 "//skia", 63 "//skia",
67 "//third_party/android_tools:cpu_features", 64 "//third_party/android_tools:cpu_features",
68 "//ui/android", 65 "//ui/android",
69 "//ui/events", 66 "//ui/events",
70 "//ui/shell_dialogs", 67 "//ui/shell_dialogs",
71 ] 68 ]
72 } 69 }
73 70
74 if (is_linux && enable_plugins) { 71 if (is_linux && enable_plugins) {
75 content_app_deps += [ "//content/ppapi_plugin:ppapi_plugin_sources" ] 72 content_app_deps += [ "//content/ppapi_plugin:ppapi_plugin_sources" ]
76 } 73 }
77 74
78 if (!is_multi_dll_chrome) {
79 content_app_deps += [ "//content/gpu:gpu_sources" ]
80 }
81
82 # Compile content_main_runner.cc in a separate target to exempt from GN 75 # Compile content_main_runner.cc in a separate target to exempt from GN
83 # header checking without exempting any other source file. This file includes 76 # header checking without exempting any other source file. This file includes
84 # headers of all process types and varies significantly per platform in 77 # headers of all process types and varies significantly per platform in
85 # between browser and child. Otherwise it would require many "nogncheck" 78 # between browser and child. Otherwise it would require many "nogncheck"
86 # annotations that would both be useless and add noise. 79 # annotations that would both be useless and add noise.
87 # 80 #
88 # This will generate :content_main_runner_both, :content_main_runner_browser, 81 # This will generate :content_main_runner_both, :content_main_runner_browser,
89 # and :content_main_runner_child. 82 # and :content_main_runner_child.
90 source_set(runner_target_name) { 83 source_set(runner_target_name) {
91 visibility = [ ":$main_target_name" ] 84 visibility = [ ":$main_target_name" ]
92 check_includes = false 85 check_includes = false
93 86
94 sources = [ 87 sources = [
95 "content_main_runner.cc", 88 "content_main_runner.cc",
96 ] 89 ]
97 90
98 configs += extra_configs 91 configs += extra_configs
99 deps = content_app_deps 92 deps = content_app_deps
93 if (defined(invoker.deps)) {
94 deps += invoker.deps
95 }
100 96
101 forward_variables_from(invoker, [ "defines" ]) 97 forward_variables_from(invoker, [ "defines" ])
102 } 98 }
103 99
104 source_set(main_target_name) { 100 source_set(main_target_name) {
105 sources = [ 101 sources = [
106 "mac/mac_init.h", 102 "mac/mac_init.h",
107 "mac/mac_init.mm", 103 "mac/mac_init.mm",
108 "mojo/mojo_init.cc", 104 "mojo/mojo_init.cc",
109 "mojo/mojo_init.h", 105 "mojo/mojo_init.h",
(...skipping 21 matching lines...) Expand all
131 "//ipc", 127 "//ipc",
132 ] 128 ]
133 forward_variables_from(invoker, 129 forward_variables_from(invoker,
134 [ 130 [
135 "defines", 131 "defines",
136 "visibility", 132 "visibility",
137 ]) 133 ])
138 } 134 }
139 } 135 }
140 136
137 group("content_app_browser_deps") {
138 deps = [
139 "//content/browser",
140 "//content/public/browser:browser_sources",
141 ]
142 }
143
144 group("content_app_child_deps") {
145 deps = [
146 "//content/public/gpu:gpu_sources",
147 "//content/public/renderer:renderer_sources",
148 "//content/public/utility:utility_sources",
149 ]
150 }
151
141 # This includes the app sources for both the browser and child processes. 152 # This includes the app sources for both the browser and child processes.
142 implement_content_app("both") { 153 implement_content_app("both") {
143 # Only the public target should depend on this. All other targets (even 154 # Only the public target should depend on this. All other targets (even
144 # internal content ones) should depend on the public one. 155 # internal content ones) should depend on the public one.
145 visibility = [ 156 visibility = [
146 ":both_for_content_tests", # See top of //content/BUILD.gn for why. 157 ":both_for_content_tests", # See top of //content/BUILD.gn for why.
147 "//content/public/app:*", 158 "//content/public/app:*",
148 ] 159 ]
160 deps = [
161 ":content_app_browser_deps",
162 ":content_app_child_deps",
163 "//content/gpu:gpu_sources",
164 "//content/renderer",
165 "//content/utility",
166 ]
149 } 167 }
150 168
151 # See comment at the top of //content/BUILD.gn for how this works. 169 # See comment at the top of //content/BUILD.gn for how this works.
152 group("both_for_content_tests") { 170 group("both_for_content_tests") {
153 visibility = [ "//content/test/*" ] 171 visibility = [ "//content/test/*" ]
154 if (!is_component_build) { 172 if (!is_component_build) {
155 public_deps = [ 173 public_deps = [
156 ":both", 174 ":both",
157 ] 175 ]
158 } 176 }
159 } 177 }
160 178
161 if (is_multi_dll_chrome) { 179 if (is_multi_dll_chrome) {
162 # It doesn't make sense to do the browser/child dll split in component mode. 180 # It doesn't make sense to do the browser/child dll split in component mode.
163 assert(!is_component_build) 181 assert(!is_component_build)
164 182
165 implement_content_app("browser") { 183 implement_content_app("browser") {
166 visibility = [ "//content/public/app:browser" ] 184 visibility = [ "//content/public/app:browser" ]
167 defines = [ "CHROME_MULTIPLE_DLL_BROWSER" ] 185 defines = [ "CHROME_MULTIPLE_DLL_BROWSER" ]
186 deps = [
187 ":content_app_browser_deps",
188 ]
168 } 189 }
169 190
170 implement_content_app("child") { 191 implement_content_app("child") {
171 visibility = [ "//content/public/app:child" ] 192 visibility = [ "//content/public/app:child" ]
172 defines = [ "CHROME_MULTIPLE_DLL_CHILD" ] 193 defines = [ "CHROME_MULTIPLE_DLL_CHILD" ]
194 deps = [
195 ":content_app_child_deps",
196 ]
173 } 197 }
174 } 198 }
OLDNEW
« no previous file with comments | « no previous file | content/app/content_main_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698