blob: c5d320a95c1eeb0f53b1764584884ca47729338b [file] [log] [blame]
[email protected]df3ecfde2014-05-20 21:52:341# 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.
4
[email protected]7e4c33142014-05-21 22:01:325import("//build/config/features.gni")
6import("//build/config/ui.gni")
[email protected]df3ecfde2014-05-20 21:52:347import("//content/common/common.gni")
xhwang13eab742015-11-18 20:29:378import("//media/media_options.gni")
rockot85dce0862015-11-13 01:33:599import("//mojo/public/tools/bindings/mojom.gni")
ochangdd89a1e2016-06-08 16:39:0110import("//tools/ipc_fuzzer/ipc_fuzzer.gni")
dpranke517335e2015-08-01 02:41:1411if (is_mac) {
12 import("//build/config/mac/mac_sdk.gni")
13}
[email protected]df3ecfde2014-05-20 21:52:3414
15source_set("common") {
brettwb78fc9e2016-03-25 21:02:5116 # Targets external to content should always link to the public API.
17 # In addition, targets outside of the content component (shell and tests)
18 # must not link to this because it will duplicate the code in the component
19 # build.
20 visibility = [ "//content/*" ]
[email protected]df3ecfde2014-05-20 21:52:3421
22 sources = rebase_path(content_common_gypi_values.private_common_sources,
scottmg7afc4092014-12-03 19:22:4223 ".",
24 "//content")
[email protected]df3ecfde2014-05-20 21:52:3425
brettw1deb76bc2015-02-18 19:28:2026 configs += [
27 "//content:content_implementation",
brettwbc8b2a22015-07-28 18:24:4228 "//build/config:precompiled_headers",
brettw1deb76bc2015-02-18 19:28:2029 "//build/config/compiler:no_size_t_to_int_warning",
henryhsu5580c3ab2016-07-14 05:11:4130 "//media/gpu:gpu_config",
brettw1deb76bc2015-02-18 19:28:2031 ]
[email protected]df3ecfde2014-05-20 21:52:3432
Brett Wilsone53895272014-09-23 23:41:4633 public_deps = [
jamb3c1195df2016-03-21 20:41:2934 ":mojo_bindings",
Brett Wilsone53895272014-09-23 23:41:4635 "//gpu/command_buffer/common",
agrievee786dac2015-12-02 14:45:2236 "//ipc",
Brett Wilsone53895272014-09-23 23:41:4637 "//third_party/WebKit/public:blink_headers",
38 ]
[email protected]df3ecfde2014-05-20 21:52:3439 deps = [
40 "//base",
brettw63340882016-03-22 17:09:4941 "//base/third_party/dynamic_annotations",
[email protected]7e4c33142014-05-21 22:01:3242 "//build/util:webkit_version",
jamb3c1195df2016-03-21 20:41:2943 "//cc",
fsamuel812b8482016-05-16 18:52:1844 "//cc/ipc",
brettw63340882016-03-22 17:09:4945 "//cc/surfaces",
[email protected]df3ecfde2014-05-20 21:52:3446 "//components/tracing",
zhenw062a94522015-06-22 20:55:2847 "//components/tracing:startup_tracing",
brettw26c6ab452016-06-23 00:41:0948 "//content:resources",
49 "//content/app/resources",
jamb3c1195df2016-03-21 20:41:2950 "//device/bluetooth",
brettw63340882016-03-22 17:09:4951 "//gpu",
jamb3c1195df2016-03-21 20:41:2952 "//gpu/command_buffer/client:gles2_c_lib",
53 "//gpu/command_buffer/client:gles2_cmd_helper",
54 "//gpu/command_buffer/client:gles2_implementation",
jbromancba3d2fe2014-09-16 01:04:2455 "//gpu/command_buffer/client:gles2_interface",
brettw542f7532015-04-06 22:35:4556 "//gpu/command_buffer/common:gles2_utils",
jamb3c1195df2016-03-21 20:41:2957 "//gpu/command_buffer/service",
penghuang346a46f92016-03-31 21:37:5258 "//gpu/ipc/client",
jamb3c1195df2016-03-21 20:41:2959 "//gpu/ipc/common",
60 "//gpu/skia_bindings",
61 "//ipc",
jamb3c1195df2016-03-21 20:41:2962 "//media",
63 "//media:shared_memory_support",
jamc17b7fa02016-05-12 03:57:5564 "//media/base/ipc",
mcasase40d7522016-06-21 16:11:4065 "//media/capture",
penghuang13b168b2016-04-07 15:23:3166 "//media/gpu/ipc/client",
fsamuel29ebf3c2016-04-01 00:20:0067 "//media/gpu/ipc/common",
jamb3c1195df2016-03-21 20:41:2968 "//media/midi",
69 "//mojo/common:common_base",
jamb3c1195df2016-03-21 20:41:2970 "//mojo/edk/system",
[email protected]df3ecfde2014-05-20 21:52:3471 "//net",
jamb3c1195df2016-03-21 20:41:2972 "//sandbox",
benf709a3092016-04-12 22:38:2273 "//services/shell",
74 "//services/shell/public/cpp",
75 "//services/shell/public/interfaces",
76 "//services/shell/runner/common",
ben6b0453d12016-07-02 04:27:1977 "//services/ui/public/interfaces",
[email protected]df3ecfde2014-05-20 21:52:3478 "//skia",
jamb3c1195df2016-03-21 20:41:2979 "//storage/common",
scottmg581bbb4d2016-05-06 18:35:1680 "//third_party/WebKit/public:blink_minimal",
jamb3c1195df2016-03-21 20:41:2981 "//third_party/boringssl",
[email protected]df3ecfde2014-05-20 21:52:3482 "//third_party/icu",
rockotac2a36e2015-11-20 17:56:5483 "//third_party/libjingle",
brettwc15ed732016-03-21 23:14:2984 "//third_party/webrtc/base:rtc_base",
[email protected]df3ecfde2014-05-20 21:52:3485 "//ui/accessibility",
[email protected]52140d882014-05-30 19:22:4086 "//ui/base",
spang1c36fac2015-02-05 19:55:1287 "//ui/base/ime",
brettw26c6ab452016-06-23 00:41:0988 "//ui/display",
Nico Weber9d6e12942016-04-19 18:51:0989 "//ui/events/ipc",
[email protected]df3ecfde2014-05-20 21:52:3490 "//ui/gfx",
91 "//ui/gfx/geometry",
[email protected]d7e69fa2014-07-24 21:19:2892 "//ui/gfx/ipc",
ccamerone0d9f382016-07-19 20:12:1593 "//ui/gfx/ipc/color",
fsamuel6b98cf92016-04-28 05:42:2494 "//ui/gfx/ipc/geometry",
markdittmer99d77bf2016-03-31 19:03:2495 "//ui/gfx/ipc/skia",
jamb3c1195df2016-03-21 20:41:2996 "//ui/gl",
[email protected]a1d7d4f2014-07-16 21:33:3697 "//ui/shell_dialogs",
[email protected]df3ecfde2014-05-20 21:52:3498 "//url",
markdittmer67b71ea2016-03-03 22:40:0399 "//url/ipc:url_ipc",
[email protected]df3ecfde2014-05-20 21:52:34100 ]
[email protected]7e4c33142014-05-21 22:01:32101
ben3f5f9992015-11-19 10:38:30102 defines = []
[email protected]7e4c33142014-05-21 22:01:32103 include_dirs = []
[email protected]7e4c33142014-05-21 22:01:32104 libs = []
105 ldflags = []
106
107 if (is_android && use_seccomp_bpf) {
108 set_sources_assignment_filter([])
109 sources += [
110 "sandbox_linux/sandbox_bpf_base_policy_linux.cc",
111 "sandbox_linux/sandbox_bpf_base_policy_linux.h",
112 ]
113 set_sources_assignment_filter(sources_assignment_filter)
114 }
115
116 if (is_mac) {
markdittmer6e70beb82016-05-02 05:40:47117 deps += [ "//sandbox/mac:seatbelt" ]
[email protected]7e4c33142014-05-21 22:01:32118 }
119
120 if (is_android) {
James Robinson060f2e32014-09-10 22:31:37121 deps += [
James Robinson060f2e32014-09-10 22:31:37122 "//content/public/android:common_aidl",
rockotac2a36e2015-11-20 17:56:54123 "//content/public/android:jni",
James Robinson060f2e32014-09-10 22:31:37124 ]
[email protected]7e4c33142014-05-21 22:01:32125
126 libs += [ "android" ]
127 }
128
agrievee786dac2015-12-02 14:45:22129 if (is_debug && !is_component_build && enable_plugins) {
erg85ac9312015-04-16 18:20:53130 # Content depends on the PPAPI message logging stuff; if this isn't here,
131 # some unit test binaries won't compile. This only worked in release mode
132 # because logging is disabled there.
133 deps += [ "//ppapi/proxy:ipc_sources" ]
134 }
135
revemanbc2de2b2014-11-17 03:21:32136 if (use_ozone) {
spang033576972016-02-24 00:10:57137 deps += [ "//ui/ozone" ]
revemanbc2de2b2014-11-17 03:21:32138 } else {
139 sources -= [
140 "cursors/webcursor_ozone.cc",
141 "font_list_ozone.cc",
revemanbc2de2b2014-11-17 03:21:32142 ]
[email protected]7e4c33142014-05-21 22:01:32143 }
144
mfomitchev2977ebf2015-08-07 00:12:29145 if (!use_aura || is_android) {
[email protected]79ff77e62014-07-08 10:59:16146 sources -= [ "cursors/webcursor_aura.cc" ]
147 }
148
[email protected]7e4c33142014-05-21 22:01:32149 if (!use_aura || !use_x11) {
150 sources -= [ "cursors/webcursor_aurax11.cc" ]
151 }
152
153 if (use_pango) {
agrieve95ba4442016-04-25 15:47:13154 configs += [ "//build/config/linux/pangocairo" ]
[email protected]7e4c33142014-05-21 22:01:32155 if (use_ozone) {
156 # If we're using pango, never use this ozone file (it was removed in all
157 # non-ozone cases above).
158 sources -= [ "font_list_ozone.cc" ]
159 }
160 } else {
scottmg7afc4092014-12-03 19:22:42161 sources -= [ "font_list_pango.cc" ]
[email protected]7e4c33142014-05-21 22:01:32162 }
163
[email protected]7e4c33142014-05-21 22:01:32164 if (enable_plugins) {
brettw26c6ab452016-06-23 00:41:09165 deps += [
166 "//ppapi/proxy",
167 "//ppapi/shared_impl",
168 ]
[email protected]7e4c33142014-05-21 22:01:32169 } else {
170 sources -= [
thestigc4cac8f2014-09-04 21:17:50171 "pepper_file_util.cc",
172 "pepper_file_util.h",
[email protected]7e4c33142014-05-21 22:01:32173 "pepper_plugin_list.cc",
174 "pepper_plugin_list.h",
thestigc4cac8f2014-09-04 21:17:50175 "pepper_renderer_instance_data.cc",
176 "pepper_renderer_instance_data.h",
177 "plugin_list.cc",
178 "plugin_list.h",
[email protected]7e4c33142014-05-21 22:01:32179 ]
180 }
181
[email protected]7e4c33142014-05-21 22:01:32182 if (!is_win || !use_aura) {
183 sources -= [ "cursors/webcursor_aurawin.cc" ]
184 }
[email protected]7e4c33142014-05-21 22:01:32185
186 if (use_seccomp_bpf) {
187 defines += [ "USE_SECCOMP_BPF" ]
188 } else {
189 if (is_linux) {
190 sources -= [
191 "sandbox_linux/bpf_cros_arm_gpu_policy_linux.cc",
192 "sandbox_linux/bpf_cros_arm_gpu_policy_linux.h",
193 "sandbox_linux/bpf_gpu_policy_linux.cc",
194 "sandbox_linux/bpf_gpu_policy_linux.h",
195 "sandbox_linux/bpf_ppapi_policy_linux.cc",
196 "sandbox_linux/bpf_ppapi_policy_linux.h",
197 "sandbox_linux/bpf_renderer_policy_linux.cc",
198 "sandbox_linux/bpf_renderer_policy_linux.h",
[email protected]692a9542014-06-25 23:04:47199 "sandbox_linux/bpf_utility_policy_linux.cc",
200 "sandbox_linux/bpf_utility_policy_linux.h",
[email protected]7e4c33142014-05-21 22:01:32201 "sandbox_linux/sandbox_bpf_base_policy_linux.cc",
202 "sandbox_linux/sandbox_bpf_base_policy_linux.h",
203 ]
204 }
205 if (is_android) {
206 sources -= [
207 "sandbox_linux/android/sandbox_bpf_base_policy_android.cc",
208 "sandbox_linux/android/sandbox_bpf_base_policy_android.h",
209 ]
210 }
211 }
ochangdd89a1e2016-06-08 16:39:01212
brettw26c6ab452016-06-23 00:41:09213 if (is_mac) {
214 deps += [ "//media/gpu" ]
215 }
216
ochangdd89a1e2016-06-08 16:39:01217 if (enable_ipc_fuzzer) {
218 configs += [ "//tools/ipc_fuzzer:ipc_fuzzer_config" ]
219 sources += [
220 "external_ipc_dumper.cc",
221 "external_ipc_dumper.h",
222 ]
223 }
[email protected]df3ecfde2014-05-20 21:52:34224}
[email protected]7e4c33142014-05-21 22:01:32225
brettwb78fc9e2016-03-25 21:02:51226# See comment at the top of //content/BUILD.gn for how this works.
227group("for_content_tests") {
228 visibility = [ "//content/test/*" ]
229 if (!is_component_build) {
230 public_deps = [
231 ":common",
232 ]
233 }
234}
235
[email protected]189add52014-05-28 16:51:44236mojom("mojo_bindings") {
brettwb78fc9e2016-03-25 21:02:51237 # This interface is internal to content. However, this is not exported from
238 # the content component shared library. Code in content but outside of the
239 # content component (content/test or content/shell) should link to this
240 # directly.
241 visibility = [ "//content/*" ]
242
[email protected]189add52014-05-28 16:51:44243 sources = [
ben76f52b242016-06-18 05:42:48244 "frame.mojom",
halton.huoca2eabd2015-07-06 08:17:40245 "image_downloader/image_downloader.mojom",
jamc912ca32016-02-24 20:17:31246 "leveldb_wrapper.mojom",
rockotb814a582015-06-05 00:30:52247 "process_control.mojom",
rockot1587e332016-07-27 17:44:14248 "render_frame_message_filter.mojom",
fsamuel6c6da0232015-11-26 05:13:46249 "render_widget_window_tree_client_factory.mojom",
mek27c9d742015-07-16 18:30:18250 "service_worker/embedded_worker_setup.mojom",
jamc912ca32016-02-24 20:17:31251 "storage_partition_service.mojom",
[email protected]189add52014-05-28 16:51:44252 ]
[email protected]e2051232014-06-30 17:45:45253
rockotb814a582015-06-05 00:30:52254 import_dirs = [ "//mojo/services" ]
255
rockot0506ca82016-02-05 18:13:05256 public_deps = [
jamc912ca32016-02-24 20:17:31257 "//components/leveldb/public/interfaces",
sammc413d6472016-07-05 07:43:31258 "//device/sensors/public/interfaces",
benf709a3092016-04-12 22:38:22259 "//services/shell/public/interfaces",
ben6b0453d12016-07-02 04:27:19260 "//services/ui/public/interfaces",
halton.huoca2eabd2015-07-06 08:17:40261 "//skia/public/interfaces",
ortunob160cb72016-03-16 20:44:30262 "//third_party/WebKit/public:mojo_bindings",
sammc813a8eb32016-05-28 03:34:07263 "//ui/gfx/geometry/mojo",
sammcf6f4fcf2016-06-21 05:39:39264 "//url/mojo:url_mojom_gurl",
sammca1107b72016-03-23 18:51:58265 "//url/mojo:url_mojom_origin",
[email protected]e2051232014-06-30 17:45:45266 ]
yzshen4e4d53c2016-07-19 06:56:42267
268 use_new_wrapper_types = false
[email protected]189add52014-05-28 16:51:44269}