blob: d7e837202dc427e64d26a28b9613c8a8afb91ddf [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")
dpranke517335e2015-08-01 02:41:1410if (is_mac) {
11 import("//build/config/mac/mac_sdk.gni")
12}
[email protected]df3ecfde2014-05-20 21:52:3413
14source_set("common") {
brettwb78fc9e2016-03-25 21:02:5115 # Targets external to content should always link to the public API.
16 # In addition, targets outside of the content component (shell and tests)
17 # must not link to this because it will duplicate the code in the component
18 # build.
19 visibility = [ "//content/*" ]
[email protected]df3ecfde2014-05-20 21:52:3420
21 sources = rebase_path(content_common_gypi_values.private_common_sources,
scottmg7afc4092014-12-03 19:22:4222 ".",
23 "//content")
[email protected]df3ecfde2014-05-20 21:52:3424
brettw1deb76bc2015-02-18 19:28:2025 configs += [
26 "//content:content_implementation",
brettwbc8b2a22015-07-28 18:24:4227 "//build/config:precompiled_headers",
brettw1deb76bc2015-02-18 19:28:2028 "//build/config/compiler:no_size_t_to_int_warning",
29 ]
[email protected]df3ecfde2014-05-20 21:52:3430
Brett Wilsone53895272014-09-23 23:41:4631 public_deps = [
jamb3c1195df2016-03-21 20:41:2932 ":mojo_bindings",
Brett Wilsone53895272014-09-23 23:41:4633 "//gpu/command_buffer/common",
agrievee786dac2015-12-02 14:45:2234 "//ipc",
Brett Wilsone53895272014-09-23 23:41:4635 "//third_party/WebKit/public:blink_headers",
36 ]
[email protected]df3ecfde2014-05-20 21:52:3437 deps = [
38 "//base",
brettw63340882016-03-22 17:09:4939 "//base/third_party/dynamic_annotations",
[email protected]7e4c33142014-05-21 22:01:3240 "//build/util:webkit_version",
jamb3c1195df2016-03-21 20:41:2941 "//cc",
fsamuel812b8482016-05-16 18:52:1842 "//cc/ipc",
brettw63340882016-03-22 17:09:4943 "//cc/surfaces",
ben03b7b9d2015-11-15 12:13:0944 "//components/mus/public/interfaces",
[email protected]df3ecfde2014-05-20 21:52:3445 "//components/tracing",
zhenw062a94522015-06-22 20:55:2846 "//components/tracing:startup_tracing",
jamb3c1195df2016-03-21 20:41:2947 "//device/bluetooth",
brettw63340882016-03-22 17:09:4948 "//gpu",
jamb3c1195df2016-03-21 20:41:2949 "//gpu/command_buffer/client:gles2_c_lib",
50 "//gpu/command_buffer/client:gles2_cmd_helper",
51 "//gpu/command_buffer/client:gles2_implementation",
jbromancba3d2fe2014-09-16 01:04:2452 "//gpu/command_buffer/client:gles2_interface",
brettw542f7532015-04-06 22:35:4553 "//gpu/command_buffer/common:gles2_utils",
jamb3c1195df2016-03-21 20:41:2954 "//gpu/command_buffer/service",
penghuang346a46f92016-03-31 21:37:5255 "//gpu/ipc/client",
jamb3c1195df2016-03-21 20:41:2956 "//gpu/ipc/common",
57 "//gpu/skia_bindings",
58 "//ipc",
59 "//ipc/mojo",
60 "//media",
61 "//media:shared_memory_support",
jamc17b7fa02016-05-12 03:57:5562 "//media/base/ipc",
penghuang13b168b2016-04-07 15:23:3163 "//media/gpu/ipc/client",
fsamuel29ebf3c2016-04-01 00:20:0064 "//media/gpu/ipc/common",
jamb3c1195df2016-03-21 20:41:2965 "//media/midi",
66 "//mojo/common:common_base",
jamb3c1195df2016-03-21 20:41:2967 "//mojo/edk/system",
[email protected]df3ecfde2014-05-20 21:52:3468 "//net",
jamb3c1195df2016-03-21 20:41:2969 "//sandbox",
benf709a3092016-04-12 22:38:2270 "//services/shell",
71 "//services/shell/public/cpp",
72 "//services/shell/public/interfaces",
73 "//services/shell/runner/common",
[email protected]df3ecfde2014-05-20 21:52:3474 "//skia",
jamb3c1195df2016-03-21 20:41:2975 "//storage/common",
scottmg581bbb4d2016-05-06 18:35:1676 "//third_party/WebKit/public:blink_minimal",
jamb3c1195df2016-03-21 20:41:2977 "//third_party/boringssl",
[email protected]df3ecfde2014-05-20 21:52:3478 "//third_party/icu",
rockotac2a36e2015-11-20 17:56:5479 "//third_party/libjingle",
brettwc15ed732016-03-21 23:14:2980 "//third_party/webrtc/base:rtc_base",
[email protected]df3ecfde2014-05-20 21:52:3481 "//ui/accessibility",
[email protected]52140d882014-05-30 19:22:4082 "//ui/base",
spang1c36fac2015-02-05 19:55:1283 "//ui/base/ime",
Nico Weber9d6e12942016-04-19 18:51:0984 "//ui/events/ipc",
[email protected]df3ecfde2014-05-20 21:52:3485 "//ui/gfx",
86 "//ui/gfx/geometry",
[email protected]d7e69fa2014-07-24 21:19:2887 "//ui/gfx/ipc",
fsamuel6b98cf92016-04-28 05:42:2488 "//ui/gfx/ipc/geometry",
markdittmer99d77bf2016-03-31 19:03:2489 "//ui/gfx/ipc/skia",
jamb3c1195df2016-03-21 20:41:2990 "//ui/gl",
[email protected]a1d7d4f2014-07-16 21:33:3691 "//ui/shell_dialogs",
[email protected]df3ecfde2014-05-20 21:52:3492 "//url",
markdittmer67b71ea2016-03-03 22:40:0393 "//url/ipc:url_ipc",
[email protected]df3ecfde2014-05-20 21:52:3494 ]
[email protected]7e4c33142014-05-21 22:01:3295
ben3f5f9992015-11-19 10:38:3096 defines = []
[email protected]7e4c33142014-05-21 22:01:3297 include_dirs = []
[email protected]7e4c33142014-05-21 22:01:3298 libs = []
99 ldflags = []
100
101 if (is_android && use_seccomp_bpf) {
102 set_sources_assignment_filter([])
103 sources += [
104 "sandbox_linux/sandbox_bpf_base_policy_linux.cc",
105 "sandbox_linux/sandbox_bpf_base_policy_linux.h",
106 ]
107 set_sources_assignment_filter(sources_assignment_filter)
108 }
109
110 if (is_mac) {
markdittmer6e70beb82016-05-02 05:40:47111 deps += [ "//sandbox/mac:seatbelt" ]
[email protected]7e4c33142014-05-21 22:01:32112 }
113
114 if (is_android) {
James Robinson060f2e32014-09-10 22:31:37115 deps += [
James Robinson060f2e32014-09-10 22:31:37116 "//content/public/android:common_aidl",
rockotac2a36e2015-11-20 17:56:54117 "//content/public/android:jni",
James Robinson060f2e32014-09-10 22:31:37118 ]
[email protected]7e4c33142014-05-21 22:01:32119
120 libs += [ "android" ]
121 }
122
agrievee786dac2015-12-02 14:45:22123 if (is_debug && !is_component_build && enable_plugins) {
erg85ac9312015-04-16 18:20:53124 # Content depends on the PPAPI message logging stuff; if this isn't here,
125 # some unit test binaries won't compile. This only worked in release mode
126 # because logging is disabled there.
127 deps += [ "//ppapi/proxy:ipc_sources" ]
128 }
129
revemanbc2de2b2014-11-17 03:21:32130 if (use_ozone) {
spang033576972016-02-24 00:10:57131 deps += [ "//ui/ozone" ]
revemanbc2de2b2014-11-17 03:21:32132 } else {
133 sources -= [
134 "cursors/webcursor_ozone.cc",
135 "font_list_ozone.cc",
revemanbc2de2b2014-11-17 03:21:32136 ]
[email protected]7e4c33142014-05-21 22:01:32137 }
138
mfomitchev2977ebf2015-08-07 00:12:29139 if (!use_aura || is_android) {
[email protected]79ff77e62014-07-08 10:59:16140 sources -= [ "cursors/webcursor_aura.cc" ]
141 }
142
[email protected]7e4c33142014-05-21 22:01:32143 if (!use_aura || !use_x11) {
144 sources -= [ "cursors/webcursor_aurax11.cc" ]
145 }
146
147 if (use_pango) {
agrieve95ba4442016-04-25 15:47:13148 configs += [ "//build/config/linux/pangocairo" ]
[email protected]7e4c33142014-05-21 22:01:32149 if (use_ozone) {
150 # If we're using pango, never use this ozone file (it was removed in all
151 # non-ozone cases above).
152 sources -= [ "font_list_ozone.cc" ]
153 }
154 } else {
scottmg7afc4092014-12-03 19:22:42155 sources -= [ "font_list_pango.cc" ]
[email protected]7e4c33142014-05-21 22:01:32156 }
157
[email protected]7e4c33142014-05-21 22:01:32158 if (enable_plugins) {
brettwf7eb6ca2015-02-14 01:37:31159 deps += [ "//ppapi/shared_impl" ]
[email protected]7e4c33142014-05-21 22:01:32160 } else {
161 sources -= [
thestigc4cac8f2014-09-04 21:17:50162 "pepper_file_util.cc",
163 "pepper_file_util.h",
164 "pepper_messages.h",
[email protected]7e4c33142014-05-21 22:01:32165 "pepper_plugin_list.cc",
166 "pepper_plugin_list.h",
thestigc4cac8f2014-09-04 21:17:50167 "pepper_renderer_instance_data.cc",
168 "pepper_renderer_instance_data.h",
169 "plugin_list.cc",
170 "plugin_list.h",
[email protected]7e4c33142014-05-21 22:01:32171 ]
172 }
173
[email protected]7e4c33142014-05-21 22:01:32174 if (!is_win || !use_aura) {
175 sources -= [ "cursors/webcursor_aurawin.cc" ]
176 }
[email protected]7e4c33142014-05-21 22:01:32177
178 if (use_seccomp_bpf) {
179 defines += [ "USE_SECCOMP_BPF" ]
180 } else {
181 if (is_linux) {
182 sources -= [
183 "sandbox_linux/bpf_cros_arm_gpu_policy_linux.cc",
184 "sandbox_linux/bpf_cros_arm_gpu_policy_linux.h",
185 "sandbox_linux/bpf_gpu_policy_linux.cc",
186 "sandbox_linux/bpf_gpu_policy_linux.h",
187 "sandbox_linux/bpf_ppapi_policy_linux.cc",
188 "sandbox_linux/bpf_ppapi_policy_linux.h",
189 "sandbox_linux/bpf_renderer_policy_linux.cc",
190 "sandbox_linux/bpf_renderer_policy_linux.h",
[email protected]692a9542014-06-25 23:04:47191 "sandbox_linux/bpf_utility_policy_linux.cc",
192 "sandbox_linux/bpf_utility_policy_linux.h",
[email protected]7e4c33142014-05-21 22:01:32193 "sandbox_linux/sandbox_bpf_base_policy_linux.cc",
194 "sandbox_linux/sandbox_bpf_base_policy_linux.h",
195 ]
196 }
197 if (is_android) {
198 sources -= [
199 "sandbox_linux/android/sandbox_bpf_base_policy_android.cc",
200 "sandbox_linux/android/sandbox_bpf_base_policy_android.h",
201 ]
202 }
203 }
[email protected]df3ecfde2014-05-20 21:52:34204}
[email protected]7e4c33142014-05-21 22:01:32205
brettwb78fc9e2016-03-25 21:02:51206# See comment at the top of //content/BUILD.gn for how this works.
207group("for_content_tests") {
208 visibility = [ "//content/test/*" ]
209 if (!is_component_build) {
210 public_deps = [
211 ":common",
212 ]
213 }
214}
215
[email protected]189add52014-05-28 16:51:44216mojom("mojo_bindings") {
brettwb78fc9e2016-03-25 21:02:51217 # This interface is internal to content. However, this is not exported from
218 # the content component shared library. Code in content but outside of the
219 # content component (content/test or content/shell) should link to this
220 # directly.
221 visibility = [ "//content/*" ]
222
[email protected]189add52014-05-28 16:51:44223 sources = [
rockot775ce0d2015-01-27 18:35:01224 "application_setup.mojom",
halton.huoca2eabd2015-07-06 08:17:40225 "image_downloader/image_downloader.mojom",
jamc912ca32016-02-24 20:17:31226 "leveldb_wrapper.mojom",
rockotb814a582015-06-05 00:30:52227 "process_control.mojom",
rockotf8fdd9b2015-12-16 22:22:35228 "render_frame_setup.mojom",
fsamuel6c6da0232015-11-26 05:13:46229 "render_widget_window_tree_client_factory.mojom",
mek27c9d742015-07-16 18:30:18230 "service_worker/embedded_worker_setup.mojom",
jamc912ca32016-02-24 20:17:31231 "storage_partition_service.mojom",
[email protected]189add52014-05-28 16:51:44232 ]
[email protected]e2051232014-06-30 17:45:45233
rockotb814a582015-06-05 00:30:52234 import_dirs = [ "//mojo/services" ]
235
rockot0506ca82016-02-05 18:13:05236 public_deps = [
jamc912ca32016-02-24 20:17:31237 "//components/leveldb/public/interfaces",
vabr90450d72015-12-01 16:13:54238 "//components/mus/public/interfaces",
benf709a3092016-04-12 22:38:22239 "//services/shell/public/interfaces",
halton.huoca2eabd2015-07-06 08:17:40240 "//skia/public/interfaces",
ortunob160cb72016-03-16 20:44:30241 "//third_party/WebKit/public:mojo_bindings",
sammc813a8eb32016-05-28 03:34:07242 "//ui/gfx/geometry/mojo",
sammca1107b72016-03-23 18:51:58243 "//url/mojo:url_mojom_origin",
[email protected]e2051232014-06-30 17:45:45244 ]
[email protected]189add52014-05-28 16:51:44245}