[email protected] | df3ecfde | 2014-05-20 21:52:34 | [diff] [blame] | 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. |
| 4 | |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 5 | import("//build/config/features.gni") |
| 6 | import("//build/config/ui.gni") |
[email protected] | df3ecfde | 2014-05-20 21:52:34 | [diff] [blame] | 7 | import("//content/common/common.gni") |
xhwang | 13eab74 | 2015-11-18 20:29:37 | [diff] [blame] | 8 | import("//media/media_options.gni") |
rockot | 85dce086 | 2015-11-13 01:33:59 | [diff] [blame] | 9 | import("//mojo/public/tools/bindings/mojom.gni") |
ochang | dd89a1e | 2016-06-08 16:39:01 | [diff] [blame] | 10 | import("//tools/ipc_fuzzer/ipc_fuzzer.gni") |
dpranke | 517335e | 2015-08-01 02:41:14 | [diff] [blame] | 11 | if (is_mac) { |
| 12 | import("//build/config/mac/mac_sdk.gni") |
| 13 | } |
[email protected] | df3ecfde | 2014-05-20 21:52:34 | [diff] [blame] | 14 | |
| 15 | source_set("common") { |
brettw | b78fc9e | 2016-03-25 21:02:51 | [diff] [blame] | 16 | # 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] | df3ecfde | 2014-05-20 21:52:34 | [diff] [blame] | 21 | |
| 22 | sources = rebase_path(content_common_gypi_values.private_common_sources, |
scottmg | 7afc409 | 2014-12-03 19:22:42 | [diff] [blame] | 23 | ".", |
| 24 | "//content") |
[email protected] | df3ecfde | 2014-05-20 21:52:34 | [diff] [blame] | 25 | |
brettw | 1deb76bc | 2015-02-18 19:28:20 | [diff] [blame] | 26 | configs += [ |
| 27 | "//content:content_implementation", |
brettw | bc8b2a2 | 2015-07-28 18:24:42 | [diff] [blame] | 28 | "//build/config:precompiled_headers", |
brettw | 1deb76bc | 2015-02-18 19:28:20 | [diff] [blame] | 29 | "//build/config/compiler:no_size_t_to_int_warning", |
henryhsu | 5580c3ab | 2016-07-14 05:11:41 | [diff] [blame] | 30 | "//media/gpu:gpu_config", |
brettw | 1deb76bc | 2015-02-18 19:28:20 | [diff] [blame] | 31 | ] |
[email protected] | df3ecfde | 2014-05-20 21:52:34 | [diff] [blame] | 32 | |
Brett Wilson | e5389527 | 2014-09-23 23:41:46 | [diff] [blame] | 33 | public_deps = [ |
jam | b3c1195df | 2016-03-21 20:41:29 | [diff] [blame] | 34 | ":mojo_bindings", |
Brett Wilson | e5389527 | 2014-09-23 23:41:46 | [diff] [blame] | 35 | "//gpu/command_buffer/common", |
agrieve | e786dac | 2015-12-02 14:45:22 | [diff] [blame] | 36 | "//ipc", |
Brett Wilson | e5389527 | 2014-09-23 23:41:46 | [diff] [blame] | 37 | "//third_party/WebKit/public:blink_headers", |
| 38 | ] |
[email protected] | df3ecfde | 2014-05-20 21:52:34 | [diff] [blame] | 39 | deps = [ |
| 40 | "//base", |
brettw | 6334088 | 2016-03-22 17:09:49 | [diff] [blame] | 41 | "//base/third_party/dynamic_annotations", |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 42 | "//build/util:webkit_version", |
jam | b3c1195df | 2016-03-21 20:41:29 | [diff] [blame] | 43 | "//cc", |
fsamuel | 812b848 | 2016-05-16 18:52:18 | [diff] [blame] | 44 | "//cc/ipc", |
brettw | 6334088 | 2016-03-22 17:09:49 | [diff] [blame] | 45 | "//cc/surfaces", |
[email protected] | df3ecfde | 2014-05-20 21:52:34 | [diff] [blame] | 46 | "//components/tracing", |
zhenw | 062a9452 | 2015-06-22 20:55:28 | [diff] [blame] | 47 | "//components/tracing:startup_tracing", |
brettw | 26c6ab45 | 2016-06-23 00:41:09 | [diff] [blame] | 48 | "//content:resources", |
| 49 | "//content/app/resources", |
jam | b3c1195df | 2016-03-21 20:41:29 | [diff] [blame] | 50 | "//device/bluetooth", |
brettw | 6334088 | 2016-03-22 17:09:49 | [diff] [blame] | 51 | "//gpu", |
jam | b3c1195df | 2016-03-21 20:41:29 | [diff] [blame] | 52 | "//gpu/command_buffer/client:gles2_c_lib", |
| 53 | "//gpu/command_buffer/client:gles2_cmd_helper", |
| 54 | "//gpu/command_buffer/client:gles2_implementation", |
jbroman | cba3d2fe | 2014-09-16 01:04:24 | [diff] [blame] | 55 | "//gpu/command_buffer/client:gles2_interface", |
brettw | 542f753 | 2015-04-06 22:35:45 | [diff] [blame] | 56 | "//gpu/command_buffer/common:gles2_utils", |
jam | b3c1195df | 2016-03-21 20:41:29 | [diff] [blame] | 57 | "//gpu/command_buffer/service", |
penghuang | 346a46f9 | 2016-03-31 21:37:52 | [diff] [blame] | 58 | "//gpu/ipc/client", |
jam | b3c1195df | 2016-03-21 20:41:29 | [diff] [blame] | 59 | "//gpu/ipc/common", |
| 60 | "//gpu/skia_bindings", |
| 61 | "//ipc", |
jam | b3c1195df | 2016-03-21 20:41:29 | [diff] [blame] | 62 | "//media", |
| 63 | "//media:shared_memory_support", |
jam | c17b7fa0 | 2016-05-12 03:57:55 | [diff] [blame] | 64 | "//media/base/ipc", |
mcasas | e40d752 | 2016-06-21 16:11:40 | [diff] [blame] | 65 | "//media/capture", |
penghuang | 13b168b | 2016-04-07 15:23:31 | [diff] [blame] | 66 | "//media/gpu/ipc/client", |
fsamuel | 29ebf3c | 2016-04-01 00:20:00 | [diff] [blame] | 67 | "//media/gpu/ipc/common", |
jam | b3c1195df | 2016-03-21 20:41:29 | [diff] [blame] | 68 | "//media/midi", |
| 69 | "//mojo/common:common_base", |
jam | b3c1195df | 2016-03-21 20:41:29 | [diff] [blame] | 70 | "//mojo/edk/system", |
[email protected] | df3ecfde | 2014-05-20 21:52:34 | [diff] [blame] | 71 | "//net", |
jam | b3c1195df | 2016-03-21 20:41:29 | [diff] [blame] | 72 | "//sandbox", |
ben | f709a309 | 2016-04-12 22:38:22 | [diff] [blame] | 73 | "//services/shell", |
| 74 | "//services/shell/public/cpp", |
| 75 | "//services/shell/public/interfaces", |
| 76 | "//services/shell/runner/common", |
ben | 6b0453d1 | 2016-07-02 04:27:19 | [diff] [blame] | 77 | "//services/ui/public/interfaces", |
[email protected] | df3ecfde | 2014-05-20 21:52:34 | [diff] [blame] | 78 | "//skia", |
jam | b3c1195df | 2016-03-21 20:41:29 | [diff] [blame] | 79 | "//storage/common", |
scottmg | 581bbb4d | 2016-05-06 18:35:16 | [diff] [blame] | 80 | "//third_party/WebKit/public:blink_minimal", |
jam | b3c1195df | 2016-03-21 20:41:29 | [diff] [blame] | 81 | "//third_party/boringssl", |
[email protected] | df3ecfde | 2014-05-20 21:52:34 | [diff] [blame] | 82 | "//third_party/icu", |
rockot | ac2a36e | 2015-11-20 17:56:54 | [diff] [blame] | 83 | "//third_party/libjingle", |
brettw | c15ed73 | 2016-03-21 23:14:29 | [diff] [blame] | 84 | "//third_party/webrtc/base:rtc_base", |
[email protected] | df3ecfde | 2014-05-20 21:52:34 | [diff] [blame] | 85 | "//ui/accessibility", |
[email protected] | 52140d88 | 2014-05-30 19:22:40 | [diff] [blame] | 86 | "//ui/base", |
spang | 1c36fac | 2015-02-05 19:55:12 | [diff] [blame] | 87 | "//ui/base/ime", |
brettw | 26c6ab45 | 2016-06-23 00:41:09 | [diff] [blame] | 88 | "//ui/display", |
Nico Weber | 9d6e1294 | 2016-04-19 18:51:09 | [diff] [blame] | 89 | "//ui/events/ipc", |
[email protected] | df3ecfde | 2014-05-20 21:52:34 | [diff] [blame] | 90 | "//ui/gfx", |
| 91 | "//ui/gfx/geometry", |
[email protected] | d7e69fa | 2014-07-24 21:19:28 | [diff] [blame] | 92 | "//ui/gfx/ipc", |
ccameron | e0d9f38 | 2016-07-19 20:12:15 | [diff] [blame] | 93 | "//ui/gfx/ipc/color", |
fsamuel | 6b98cf9 | 2016-04-28 05:42:24 | [diff] [blame] | 94 | "//ui/gfx/ipc/geometry", |
markdittmer | 99d77bf | 2016-03-31 19:03:24 | [diff] [blame] | 95 | "//ui/gfx/ipc/skia", |
jam | b3c1195df | 2016-03-21 20:41:29 | [diff] [blame] | 96 | "//ui/gl", |
[email protected] | a1d7d4f | 2014-07-16 21:33:36 | [diff] [blame] | 97 | "//ui/shell_dialogs", |
[email protected] | df3ecfde | 2014-05-20 21:52:34 | [diff] [blame] | 98 | "//url", |
markdittmer | 67b71ea | 2016-03-03 22:40:03 | [diff] [blame] | 99 | "//url/ipc:url_ipc", |
[email protected] | df3ecfde | 2014-05-20 21:52:34 | [diff] [blame] | 100 | ] |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 101 | |
ben | 3f5f999 | 2015-11-19 10:38:30 | [diff] [blame] | 102 | defines = [] |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 103 | include_dirs = [] |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 104 | 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) { |
markdittmer | 6e70beb8 | 2016-05-02 05:40:47 | [diff] [blame] | 117 | deps += [ "//sandbox/mac:seatbelt" ] |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 118 | } |
| 119 | |
| 120 | if (is_android) { |
James Robinson | 060f2e3 | 2014-09-10 22:31:37 | [diff] [blame] | 121 | deps += [ |
James Robinson | 060f2e3 | 2014-09-10 22:31:37 | [diff] [blame] | 122 | "//content/public/android:common_aidl", |
rockot | ac2a36e | 2015-11-20 17:56:54 | [diff] [blame] | 123 | "//content/public/android:jni", |
James Robinson | 060f2e3 | 2014-09-10 22:31:37 | [diff] [blame] | 124 | ] |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 125 | |
| 126 | libs += [ "android" ] |
| 127 | } |
| 128 | |
agrieve | e786dac | 2015-12-02 14:45:22 | [diff] [blame] | 129 | if (is_debug && !is_component_build && enable_plugins) { |
erg | 85ac931 | 2015-04-16 18:20:53 | [diff] [blame] | 130 | # 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 | |
reveman | bc2de2b | 2014-11-17 03:21:32 | [diff] [blame] | 136 | if (use_ozone) { |
spang | 03357697 | 2016-02-24 00:10:57 | [diff] [blame] | 137 | deps += [ "//ui/ozone" ] |
reveman | bc2de2b | 2014-11-17 03:21:32 | [diff] [blame] | 138 | } else { |
| 139 | sources -= [ |
| 140 | "cursors/webcursor_ozone.cc", |
| 141 | "font_list_ozone.cc", |
reveman | bc2de2b | 2014-11-17 03:21:32 | [diff] [blame] | 142 | ] |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 143 | } |
| 144 | |
mfomitchev | 2977ebf | 2015-08-07 00:12:29 | [diff] [blame] | 145 | if (!use_aura || is_android) { |
[email protected] | 79ff77e6 | 2014-07-08 10:59:16 | [diff] [blame] | 146 | sources -= [ "cursors/webcursor_aura.cc" ] |
| 147 | } |
| 148 | |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 149 | if (!use_aura || !use_x11) { |
| 150 | sources -= [ "cursors/webcursor_aurax11.cc" ] |
| 151 | } |
| 152 | |
| 153 | if (use_pango) { |
agrieve | 95ba444 | 2016-04-25 15:47:13 | [diff] [blame] | 154 | configs += [ "//build/config/linux/pangocairo" ] |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 155 | 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 { |
scottmg | 7afc409 | 2014-12-03 19:22:42 | [diff] [blame] | 161 | sources -= [ "font_list_pango.cc" ] |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 162 | } |
| 163 | |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 164 | if (enable_plugins) { |
brettw | 26c6ab45 | 2016-06-23 00:41:09 | [diff] [blame] | 165 | deps += [ |
| 166 | "//ppapi/proxy", |
| 167 | "//ppapi/shared_impl", |
| 168 | ] |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 169 | } else { |
| 170 | sources -= [ |
thestig | c4cac8f | 2014-09-04 21:17:50 | [diff] [blame] | 171 | "pepper_file_util.cc", |
| 172 | "pepper_file_util.h", |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 173 | "pepper_plugin_list.cc", |
| 174 | "pepper_plugin_list.h", |
thestig | c4cac8f | 2014-09-04 21:17:50 | [diff] [blame] | 175 | "pepper_renderer_instance_data.cc", |
| 176 | "pepper_renderer_instance_data.h", |
| 177 | "plugin_list.cc", |
| 178 | "plugin_list.h", |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 179 | ] |
| 180 | } |
| 181 | |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 182 | if (!is_win || !use_aura) { |
| 183 | sources -= [ "cursors/webcursor_aurawin.cc" ] |
| 184 | } |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 185 | |
| 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] | 692a954 | 2014-06-25 23:04:47 | [diff] [blame] | 199 | "sandbox_linux/bpf_utility_policy_linux.cc", |
| 200 | "sandbox_linux/bpf_utility_policy_linux.h", |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 201 | "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 | } |
ochang | dd89a1e | 2016-06-08 16:39:01 | [diff] [blame] | 212 | |
brettw | 26c6ab45 | 2016-06-23 00:41:09 | [diff] [blame] | 213 | if (is_mac) { |
| 214 | deps += [ "//media/gpu" ] |
| 215 | } |
| 216 | |
ochang | dd89a1e | 2016-06-08 16:39:01 | [diff] [blame] | 217 | 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] | df3ecfde | 2014-05-20 21:52:34 | [diff] [blame] | 224 | } |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 225 | |
brettw | b78fc9e | 2016-03-25 21:02:51 | [diff] [blame] | 226 | # See comment at the top of //content/BUILD.gn for how this works. |
| 227 | group("for_content_tests") { |
| 228 | visibility = [ "//content/test/*" ] |
| 229 | if (!is_component_build) { |
| 230 | public_deps = [ |
| 231 | ":common", |
| 232 | ] |
| 233 | } |
| 234 | } |
| 235 | |
[email protected] | 189add5 | 2014-05-28 16:51:44 | [diff] [blame] | 236 | mojom("mojo_bindings") { |
brettw | b78fc9e | 2016-03-25 21:02:51 | [diff] [blame] | 237 | # 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] | 189add5 | 2014-05-28 16:51:44 | [diff] [blame] | 243 | sources = [ |
ben | 76f52b24 | 2016-06-18 05:42:48 | [diff] [blame] | 244 | "frame.mojom", |
halton.huo | ca2eabd | 2015-07-06 08:17:40 | [diff] [blame] | 245 | "image_downloader/image_downloader.mojom", |
jam | c912ca3 | 2016-02-24 20:17:31 | [diff] [blame] | 246 | "leveldb_wrapper.mojom", |
rockot | b814a58 | 2015-06-05 00:30:52 | [diff] [blame] | 247 | "process_control.mojom", |
rockot | 1587e33 | 2016-07-27 17:44:14 | [diff] [blame^] | 248 | "render_frame_message_filter.mojom", |
fsamuel | 6c6da023 | 2015-11-26 05:13:46 | [diff] [blame] | 249 | "render_widget_window_tree_client_factory.mojom", |
mek | 27c9d74 | 2015-07-16 18:30:18 | [diff] [blame] | 250 | "service_worker/embedded_worker_setup.mojom", |
jam | c912ca3 | 2016-02-24 20:17:31 | [diff] [blame] | 251 | "storage_partition_service.mojom", |
[email protected] | 189add5 | 2014-05-28 16:51:44 | [diff] [blame] | 252 | ] |
[email protected] | e205123 | 2014-06-30 17:45:45 | [diff] [blame] | 253 | |
rockot | b814a58 | 2015-06-05 00:30:52 | [diff] [blame] | 254 | import_dirs = [ "//mojo/services" ] |
| 255 | |
rockot | 0506ca8 | 2016-02-05 18:13:05 | [diff] [blame] | 256 | public_deps = [ |
jam | c912ca3 | 2016-02-24 20:17:31 | [diff] [blame] | 257 | "//components/leveldb/public/interfaces", |
sammc | 413d647 | 2016-07-05 07:43:31 | [diff] [blame] | 258 | "//device/sensors/public/interfaces", |
ben | f709a309 | 2016-04-12 22:38:22 | [diff] [blame] | 259 | "//services/shell/public/interfaces", |
ben | 6b0453d1 | 2016-07-02 04:27:19 | [diff] [blame] | 260 | "//services/ui/public/interfaces", |
halton.huo | ca2eabd | 2015-07-06 08:17:40 | [diff] [blame] | 261 | "//skia/public/interfaces", |
ortuno | b160cb7 | 2016-03-16 20:44:30 | [diff] [blame] | 262 | "//third_party/WebKit/public:mojo_bindings", |
sammc | 813a8eb3 | 2016-05-28 03:34:07 | [diff] [blame] | 263 | "//ui/gfx/geometry/mojo", |
sammc | f6f4fcf | 2016-06-21 05:39:39 | [diff] [blame] | 264 | "//url/mojo:url_mojom_gurl", |
sammc | a1107b7 | 2016-03-23 18:51:58 | [diff] [blame] | 265 | "//url/mojo:url_mojom_origin", |
[email protected] | e205123 | 2014-06-30 17:45:45 | [diff] [blame] | 266 | ] |
yzshen | 4e4d53c | 2016-07-19 06:56:42 | [diff] [blame] | 267 | |
| 268 | use_new_wrapper_types = false |
[email protected] | 189add5 | 2014-05-28 16:51:44 | [diff] [blame] | 269 | } |