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.
5 import("//build/config/features.gni")
6 import("//build/config/ui.gni")
7 import("//content/common/common.gni")
8 import("//mojo/public/tools/bindings/mojom.gni")
10 source_set("common") {
11 # Only targets in the content tree can depend directly on this target.
12 visibility = [ "//content/*" ]
14 sources = rebase_path(content_common_gypi_values.private_common_sources,
17 forward_dependent_configs_from = [
18 "//gpu/command_buffer/common",
19 "//third_party/WebKit/public:blink_headers",
23 "//content:content_implementation",
28 "//build/util:webkit_version",
29 "//components/tracing",
30 "//gpu/command_buffer/common",
41 "//third_party/WebKit/public:blink_headers",
42 "//third_party/libjingle",
50 # TODO: the dependency on gl_in_process_context should be decoupled from
51 # content and moved to android_webview. See crbug.com/365797.
52 "//gpu/command_buffer/client:gl_in_process_context",
53 "//gpu/command_buffer/client:gles2_c_lib",
54 "//gpu/command_buffer/client:gles2_implementation",
55 "//gpu/command_buffer/service",
57 "//gpu/skia_bindings",
59 "//media:shared_memory_support",
60 "//mojo/environment:chromium",
61 "//mojo/public/interfaces/application",
64 "//third_party/WebKit/public:blink",
66 "//webkit/browser:storage",
68 "//webkit/common:storage",
69 "//webkit/common/gpu",
78 if (is_android && use_seccomp_bpf) {
79 set_sources_assignment_filter([])
81 "sandbox_linux/sandbox_bpf_base_policy_linux.cc",
82 "sandbox_linux/sandbox_bpf_base_policy_linux.h",
84 set_sources_assignment_filter(sources_assignment_filter)
89 "gpu/client/gpu_memory_buffer_impl_io_surface.cc",
90 "gpu/client/gpu_memory_buffer_impl_io_surface.h",
93 "plugin_list_posix.cc",
97 "//content/app/resources",
98 "//content:resources",
99 "//third_party/WebKit/public:resources",
101 libs += [ "QuartzCore.framework" ]
106 "gpu/client/gpu_memory_buffer_impl_surface_texture.cc",
107 "gpu/client/gpu_memory_buffer_impl_surface_texture.h",
110 # TODO(GYP) enable when these targets are converted.
112 # "//content:content_jni_headers",
113 # "//content:common_aidl",
116 libs += [ "android" ]
120 sources -= [ "user_agent.cc" ]
121 assert(false, "Need to add lots of conditions here")
126 "cursors/webcursor_ozone.cc",
127 "font_list_ozone.cc",
128 "gpu/gpu_memory_buffer_factory_ozone.cc",
133 sources -= [ "cursors/webcursor_aura.cc" ]
136 if (!use_aura || !use_x11) {
137 sources -= [ "cursors/webcursor_aurax11.cc" ]
141 configs += [ "//build/config/linux:pangocairo" ]
143 # If we're using pango, never use this ozone file (it was removed in all
144 # non-ozone cases above).
145 sources -= [ "font_list_ozone.cc" ]
149 "font_list_pango.cc",
155 "gpu/gpu_memory_buffer_factory_x11_pixmap.cc",
156 "common/gpu/gpu_memory_buffer_factory_x11_pixmap.h",
158 include_dirs += [ "//third_party/khronos" ]
159 configs += [ "//build/config/linux:xcomposite" ]
161 if (cpu_arch != "arm" || !is_chromeos) {
169 "gpu/gpu_memory_buffer_factory_x11.cc",
173 if (enable_plugins) {
175 "//ppapi:ppapi_shared",
179 "pepper_plugin_list.cc",
180 "pepper_plugin_list.h",
187 "gpu/media/android_video_decode_accelerator.cc",
188 "gpu/media/android_video_decode_accelerator.h",
192 deps += [ "//third_party/libyuv" ]
196 if (is_chromeos && use_x11) {
197 if (cpu_arch == "arm") {
199 "gpu/media/exynos_v4l2_video_device.cc",
200 "gpu/media/exynos_v4l2_video_device.h",
201 "gpu/media/tegra_v4l2_video_device.cc",
202 "gpu/media/tegra_v4l2_video_device.h",
203 "gpu/media/v4l2_image_processor.cc",
204 "gpu/media/v4l2_image_processor.h",
205 "gpu/media/v4l2_video_decode_accelerator.cc",
206 "gpu/media/v4l2_video_decode_accelerator.h",
207 "gpu/media/v4l2_video_device.cc",
208 "gpu/media/v4l2_video_device.h",
209 "gpu/media/v4l2_video_encode_accelerator.cc",
210 "gpu/media/v4l2_video_encode_accelerator.h",
212 libs = [ "EGL", "GLESv2" ]
215 "gpu/media/h264_dpb.cc",
216 "gpu/media/h264_dpb.h",
217 "gpu/media/va_surface.h",
218 "gpu/media/vaapi_h264_decoder.cc",
219 "gpu/media/vaapi_h264_decoder.h",
220 "gpu/media/vaapi_video_decode_accelerator.cc",
221 "gpu/media/vaapi_video_decode_accelerator.h",
222 "gpu/media/vaapi_wrapper.cc",
223 "gpu/media/vaapi_wrapper.h",
225 assert(false, "Implement generate_stubs for libva")
231 "gpu/media/dxva_video_decode_accelerator.cc",
232 "gpu/media/dxva_video_decode_accelerator.h",
234 include_dirs += [ "//third_party/khronos" ]
239 # TODO(GYP): extract_xinput action.
242 if (!is_win || !use_aura) {
243 sources -= [ "cursors/webcursor_aurawin.cc" ]
246 if (use_seccomp_bpf) {
247 defines += [ "USE_SECCOMP_BPF" ]
251 "sandbox_linux/bpf_cros_arm_gpu_policy_linux.cc",
252 "sandbox_linux/bpf_cros_arm_gpu_policy_linux.h",
253 "sandbox_linux/bpf_gpu_policy_linux.cc",
254 "sandbox_linux/bpf_gpu_policy_linux.h",
255 "sandbox_linux/bpf_ppapi_policy_linux.cc",
256 "sandbox_linux/bpf_ppapi_policy_linux.h",
257 "sandbox_linux/bpf_renderer_policy_linux.cc",
258 "sandbox_linux/bpf_renderer_policy_linux.h",
259 "sandbox_linux/bpf_utility_policy_linux.cc",
260 "sandbox_linux/bpf_utility_policy_linux.h",
261 "sandbox_linux/sandbox_bpf_base_policy_linux.cc",
262 "sandbox_linux/sandbox_bpf_base_policy_linux.h",
267 "sandbox_linux/android/sandbox_bpf_base_policy_android.cc",
268 "sandbox_linux/android/sandbox_bpf_base_policy_android.h",
274 mojom("mojo_bindings") {
276 "render_frame_setup.mojom",
280 "//mojo/public/interfaces/application:application",