[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") |
dpranke | 517335e | 2015-08-01 02:41:14 | [diff] [blame] | 10 | if (is_mac) { |
| 11 | import("//build/config/mac/mac_sdk.gni") |
| 12 | } |
[email protected] | df3ecfde | 2014-05-20 21:52:34 | [diff] [blame] | 13 | |
| 14 | source_set("common") { |
brettw | b78fc9e | 2016-03-25 21:02:51 | [diff] [blame] | 15 | # 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] | df3ecfde | 2014-05-20 21:52:34 | [diff] [blame] | 20 | |
| 21 | sources = rebase_path(content_common_gypi_values.private_common_sources, |
scottmg | 7afc409 | 2014-12-03 19:22:42 | [diff] [blame] | 22 | ".", |
| 23 | "//content") |
[email protected] | df3ecfde | 2014-05-20 21:52:34 | [diff] [blame] | 24 | |
brettw | 1deb76bc | 2015-02-18 19:28:20 | [diff] [blame] | 25 | configs += [ |
| 26 | "//content:content_implementation", |
brettw | bc8b2a2 | 2015-07-28 18:24:42 | [diff] [blame] | 27 | "//build/config:precompiled_headers", |
brettw | 1deb76bc | 2015-02-18 19:28:20 | [diff] [blame] | 28 | "//build/config/compiler:no_size_t_to_int_warning", |
| 29 | ] |
[email protected] | df3ecfde | 2014-05-20 21:52:34 | [diff] [blame] | 30 | |
Brett Wilson | e5389527 | 2014-09-23 23:41:46 | [diff] [blame] | 31 | public_deps = [ |
jam | b3c1195df | 2016-03-21 20:41:29 | [diff] [blame] | 32 | ":mojo_bindings", |
Brett Wilson | e5389527 | 2014-09-23 23:41:46 | [diff] [blame] | 33 | "//gpu/command_buffer/common", |
agrieve | e786dac | 2015-12-02 14:45:22 | [diff] [blame] | 34 | "//ipc", |
Brett Wilson | e5389527 | 2014-09-23 23:41:46 | [diff] [blame] | 35 | "//third_party/WebKit/public:blink_headers", |
| 36 | ] |
[email protected] | df3ecfde | 2014-05-20 21:52:34 | [diff] [blame] | 37 | deps = [ |
| 38 | "//base", |
brettw | 6334088 | 2016-03-22 17:09:49 | [diff] [blame] | 39 | "//base/third_party/dynamic_annotations", |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 40 | "//build/util:webkit_version", |
jam | b3c1195df | 2016-03-21 20:41:29 | [diff] [blame] | 41 | "//cc", |
fsamuel | 812b848 | 2016-05-16 18:52:18 | [diff] [blame] | 42 | "//cc/ipc", |
brettw | 6334088 | 2016-03-22 17:09:49 | [diff] [blame] | 43 | "//cc/surfaces", |
ben | 03b7b9d | 2015-11-15 12:13:09 | [diff] [blame] | 44 | "//components/mus/public/interfaces", |
[email protected] | df3ecfde | 2014-05-20 21:52:34 | [diff] [blame] | 45 | "//components/tracing", |
zhenw | 062a9452 | 2015-06-22 20:55:28 | [diff] [blame] | 46 | "//components/tracing:startup_tracing", |
jam | b3c1195df | 2016-03-21 20:41:29 | [diff] [blame] | 47 | "//device/bluetooth", |
brettw | 6334088 | 2016-03-22 17:09:49 | [diff] [blame] | 48 | "//gpu", |
jam | b3c1195df | 2016-03-21 20:41:29 | [diff] [blame] | 49 | "//gpu/command_buffer/client:gles2_c_lib", |
| 50 | "//gpu/command_buffer/client:gles2_cmd_helper", |
| 51 | "//gpu/command_buffer/client:gles2_implementation", |
jbroman | cba3d2fe | 2014-09-16 01:04:24 | [diff] [blame] | 52 | "//gpu/command_buffer/client:gles2_interface", |
brettw | 542f753 | 2015-04-06 22:35:45 | [diff] [blame] | 53 | "//gpu/command_buffer/common:gles2_utils", |
jam | b3c1195df | 2016-03-21 20:41:29 | [diff] [blame] | 54 | "//gpu/command_buffer/service", |
penghuang | 346a46f9 | 2016-03-31 21:37:52 | [diff] [blame] | 55 | "//gpu/ipc/client", |
jam | b3c1195df | 2016-03-21 20:41:29 | [diff] [blame] | 56 | "//gpu/ipc/common", |
| 57 | "//gpu/skia_bindings", |
| 58 | "//ipc", |
| 59 | "//ipc/mojo", |
| 60 | "//media", |
| 61 | "//media:shared_memory_support", |
jam | c17b7fa0 | 2016-05-12 03:57:55 | [diff] [blame] | 62 | "//media/base/ipc", |
penghuang | 13b168b | 2016-04-07 15:23:31 | [diff] [blame] | 63 | "//media/gpu/ipc/client", |
fsamuel | 29ebf3c | 2016-04-01 00:20:00 | [diff] [blame] | 64 | "//media/gpu/ipc/common", |
jam | b3c1195df | 2016-03-21 20:41:29 | [diff] [blame] | 65 | "//media/midi", |
| 66 | "//mojo/common:common_base", |
jam | b3c1195df | 2016-03-21 20:41:29 | [diff] [blame] | 67 | "//mojo/edk/system", |
[email protected] | df3ecfde | 2014-05-20 21:52:34 | [diff] [blame] | 68 | "//net", |
jam | b3c1195df | 2016-03-21 20:41:29 | [diff] [blame] | 69 | "//sandbox", |
ben | f709a309 | 2016-04-12 22:38:22 | [diff] [blame] | 70 | "//services/shell", |
| 71 | "//services/shell/public/cpp", |
| 72 | "//services/shell/public/interfaces", |
| 73 | "//services/shell/runner/common", |
[email protected] | df3ecfde | 2014-05-20 21:52:34 | [diff] [blame] | 74 | "//skia", |
jam | b3c1195df | 2016-03-21 20:41:29 | [diff] [blame] | 75 | "//storage/common", |
scottmg | 581bbb4d | 2016-05-06 18:35:16 | [diff] [blame] | 76 | "//third_party/WebKit/public:blink_minimal", |
jam | b3c1195df | 2016-03-21 20:41:29 | [diff] [blame] | 77 | "//third_party/boringssl", |
[email protected] | df3ecfde | 2014-05-20 21:52:34 | [diff] [blame] | 78 | "//third_party/icu", |
rockot | ac2a36e | 2015-11-20 17:56:54 | [diff] [blame] | 79 | "//third_party/libjingle", |
brettw | c15ed73 | 2016-03-21 23:14:29 | [diff] [blame] | 80 | "//third_party/webrtc/base:rtc_base", |
[email protected] | df3ecfde | 2014-05-20 21:52:34 | [diff] [blame] | 81 | "//ui/accessibility", |
[email protected] | 52140d88 | 2014-05-30 19:22:40 | [diff] [blame] | 82 | "//ui/base", |
spang | 1c36fac | 2015-02-05 19:55:12 | [diff] [blame] | 83 | "//ui/base/ime", |
Nico Weber | 9d6e1294 | 2016-04-19 18:51:09 | [diff] [blame] | 84 | "//ui/events/ipc", |
[email protected] | df3ecfde | 2014-05-20 21:52:34 | [diff] [blame] | 85 | "//ui/gfx", |
| 86 | "//ui/gfx/geometry", |
[email protected] | d7e69fa | 2014-07-24 21:19:28 | [diff] [blame] | 87 | "//ui/gfx/ipc", |
fsamuel | 6b98cf9 | 2016-04-28 05:42:24 | [diff] [blame] | 88 | "//ui/gfx/ipc/geometry", |
markdittmer | 99d77bf | 2016-03-31 19:03:24 | [diff] [blame] | 89 | "//ui/gfx/ipc/skia", |
jam | b3c1195df | 2016-03-21 20:41:29 | [diff] [blame] | 90 | "//ui/gl", |
[email protected] | a1d7d4f | 2014-07-16 21:33:36 | [diff] [blame] | 91 | "//ui/shell_dialogs", |
[email protected] | df3ecfde | 2014-05-20 21:52:34 | [diff] [blame] | 92 | "//url", |
markdittmer | 67b71ea | 2016-03-03 22:40:03 | [diff] [blame] | 93 | "//url/ipc:url_ipc", |
[email protected] | df3ecfde | 2014-05-20 21:52:34 | [diff] [blame] | 94 | ] |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 95 | |
ben | 3f5f999 | 2015-11-19 10:38:30 | [diff] [blame] | 96 | defines = [] |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 97 | include_dirs = [] |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 98 | 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) { |
markdittmer | 6e70beb8 | 2016-05-02 05:40:47 | [diff] [blame] | 111 | deps += [ "//sandbox/mac:seatbelt" ] |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 112 | } |
| 113 | |
| 114 | if (is_android) { |
James Robinson | 060f2e3 | 2014-09-10 22:31:37 | [diff] [blame] | 115 | deps += [ |
James Robinson | 060f2e3 | 2014-09-10 22:31:37 | [diff] [blame] | 116 | "//content/public/android:common_aidl", |
rockot | ac2a36e | 2015-11-20 17:56:54 | [diff] [blame] | 117 | "//content/public/android:jni", |
James Robinson | 060f2e3 | 2014-09-10 22:31:37 | [diff] [blame] | 118 | ] |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 119 | |
| 120 | libs += [ "android" ] |
| 121 | } |
| 122 | |
agrieve | e786dac | 2015-12-02 14:45:22 | [diff] [blame] | 123 | if (is_debug && !is_component_build && enable_plugins) { |
erg | 85ac931 | 2015-04-16 18:20:53 | [diff] [blame] | 124 | # 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 | |
reveman | bc2de2b | 2014-11-17 03:21:32 | [diff] [blame] | 130 | if (use_ozone) { |
spang | 03357697 | 2016-02-24 00:10:57 | [diff] [blame] | 131 | deps += [ "//ui/ozone" ] |
reveman | bc2de2b | 2014-11-17 03:21:32 | [diff] [blame] | 132 | } else { |
| 133 | sources -= [ |
| 134 | "cursors/webcursor_ozone.cc", |
| 135 | "font_list_ozone.cc", |
reveman | bc2de2b | 2014-11-17 03:21:32 | [diff] [blame] | 136 | ] |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 137 | } |
| 138 | |
mfomitchev | 2977ebf | 2015-08-07 00:12:29 | [diff] [blame] | 139 | if (!use_aura || is_android) { |
[email protected] | 79ff77e6 | 2014-07-08 10:59:16 | [diff] [blame] | 140 | sources -= [ "cursors/webcursor_aura.cc" ] |
| 141 | } |
| 142 | |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 143 | if (!use_aura || !use_x11) { |
| 144 | sources -= [ "cursors/webcursor_aurax11.cc" ] |
| 145 | } |
| 146 | |
| 147 | if (use_pango) { |
agrieve | 95ba444 | 2016-04-25 15:47:13 | [diff] [blame] | 148 | configs += [ "//build/config/linux/pangocairo" ] |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 149 | 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 { |
scottmg | 7afc409 | 2014-12-03 19:22:42 | [diff] [blame] | 155 | sources -= [ "font_list_pango.cc" ] |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 156 | } |
| 157 | |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 158 | if (enable_plugins) { |
brettw | f7eb6ca | 2015-02-14 01:37:31 | [diff] [blame] | 159 | deps += [ "//ppapi/shared_impl" ] |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 160 | } else { |
| 161 | sources -= [ |
thestig | c4cac8f | 2014-09-04 21:17:50 | [diff] [blame] | 162 | "pepper_file_util.cc", |
| 163 | "pepper_file_util.h", |
| 164 | "pepper_messages.h", |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 165 | "pepper_plugin_list.cc", |
| 166 | "pepper_plugin_list.h", |
thestig | c4cac8f | 2014-09-04 21:17:50 | [diff] [blame] | 167 | "pepper_renderer_instance_data.cc", |
| 168 | "pepper_renderer_instance_data.h", |
| 169 | "plugin_list.cc", |
| 170 | "plugin_list.h", |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 171 | ] |
| 172 | } |
| 173 | |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 174 | if (!is_win || !use_aura) { |
| 175 | sources -= [ "cursors/webcursor_aurawin.cc" ] |
| 176 | } |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 177 | |
| 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] | 692a954 | 2014-06-25 23:04:47 | [diff] [blame] | 191 | "sandbox_linux/bpf_utility_policy_linux.cc", |
| 192 | "sandbox_linux/bpf_utility_policy_linux.h", |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 193 | "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] | df3ecfde | 2014-05-20 21:52:34 | [diff] [blame] | 204 | } |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 205 | |
brettw | b78fc9e | 2016-03-25 21:02:51 | [diff] [blame] | 206 | # See comment at the top of //content/BUILD.gn for how this works. |
| 207 | group("for_content_tests") { |
| 208 | visibility = [ "//content/test/*" ] |
| 209 | if (!is_component_build) { |
| 210 | public_deps = [ |
| 211 | ":common", |
| 212 | ] |
| 213 | } |
| 214 | } |
| 215 | |
[email protected] | 189add5 | 2014-05-28 16:51:44 | [diff] [blame] | 216 | mojom("mojo_bindings") { |
brettw | b78fc9e | 2016-03-25 21:02:51 | [diff] [blame] | 217 | # 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] | 189add5 | 2014-05-28 16:51:44 | [diff] [blame] | 223 | sources = [ |
rockot | 775ce0d | 2015-01-27 18:35:01 | [diff] [blame] | 224 | "application_setup.mojom", |
halton.huo | ca2eabd | 2015-07-06 08:17:40 | [diff] [blame] | 225 | "image_downloader/image_downloader.mojom", |
jam | c912ca3 | 2016-02-24 20:17:31 | [diff] [blame] | 226 | "leveldb_wrapper.mojom", |
rockot | b814a58 | 2015-06-05 00:30:52 | [diff] [blame] | 227 | "process_control.mojom", |
rockot | f8fdd9b | 2015-12-16 22:22:35 | [diff] [blame] | 228 | "render_frame_setup.mojom", |
fsamuel | 6c6da023 | 2015-11-26 05:13:46 | [diff] [blame] | 229 | "render_widget_window_tree_client_factory.mojom", |
mek | 27c9d74 | 2015-07-16 18:30:18 | [diff] [blame] | 230 | "service_worker/embedded_worker_setup.mojom", |
jam | c912ca3 | 2016-02-24 20:17:31 | [diff] [blame] | 231 | "storage_partition_service.mojom", |
[email protected] | 189add5 | 2014-05-28 16:51:44 | [diff] [blame] | 232 | ] |
[email protected] | e205123 | 2014-06-30 17:45:45 | [diff] [blame] | 233 | |
rockot | b814a58 | 2015-06-05 00:30:52 | [diff] [blame] | 234 | import_dirs = [ "//mojo/services" ] |
| 235 | |
rockot | 0506ca8 | 2016-02-05 18:13:05 | [diff] [blame] | 236 | public_deps = [ |
jam | c912ca3 | 2016-02-24 20:17:31 | [diff] [blame] | 237 | "//components/leveldb/public/interfaces", |
vabr | 90450d7 | 2015-12-01 16:13:54 | [diff] [blame] | 238 | "//components/mus/public/interfaces", |
ben | f709a309 | 2016-04-12 22:38:22 | [diff] [blame] | 239 | "//services/shell/public/interfaces", |
halton.huo | ca2eabd | 2015-07-06 08:17:40 | [diff] [blame] | 240 | "//skia/public/interfaces", |
ortuno | b160cb7 | 2016-03-16 20:44:30 | [diff] [blame] | 241 | "//third_party/WebKit/public:mojo_bindings", |
sammc | 813a8eb3 | 2016-05-28 03:34:07 | [diff] [blame^] | 242 | "//ui/gfx/geometry/mojo", |
sammc | a1107b7 | 2016-03-23 18:51:58 | [diff] [blame] | 243 | "//url/mojo:url_mojom_origin", |
[email protected] | e205123 | 2014-06-30 17:45:45 | [diff] [blame] | 244 | ] |
[email protected] | 189add5 | 2014-05-28 16:51:44 | [diff] [blame] | 245 | } |