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",
24 "//content:libjingle_stub_config",
29 "//build/util:webkit_version",
30 "//components/tracing",
31 "//gpu/command_buffer/common",
41 "//third_party/WebKit/public:blink_headers",
42 # TODO(GYP) convert these dependencies.
43 #'../third_party/libjingle/libjingle.gyp:libjingle',
50 "//mojo/environment:chromium",
52 # TODO: the dependency on gl_in_process_context should be decoupled from
53 # content and moved to android_webview. See crbug.com/365797.
54 "//gpu/command_buffer/client:gl_in_process_context",
55 "//gpu/command_buffer/client:gles2_c_lib",
56 "//gpu/command_buffer/client:gles2_implementation",
57 "//gpu/command_buffer/service",
59 "//mojo/public/interfaces/service_provider",
61 "//webkit/browser:storage",
63 "//webkit/common:storage",
64 "//webkit/common/gpu",
65 #'../gpu/gpu.gyp:gl_in_process_context',
66 #'../gpu/skia_bindings/skia_bindings.gyp:gpu_skia_bindings',
67 #'../media/media.gyp:media',
68 #'../media/media.gyp:shared_memory_support',
69 #'../third_party/WebKit/public/blink.gyp:blink',
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",
98 "//content:resources",
100 libs += [ "QuartzCore.framework" ]
105 "gpu/client/gpu_memory_buffer_impl_surface_texture.cc",
106 "gpu/client/gpu_memory_buffer_impl_surface_texture.h",
109 # TODO(GYP) enable when these targets are converted.
111 # "//content:content_jni_headers",
112 # "//content:common_aidl",
115 libs += [ "android" ]
119 sources -= [ "user_agent.cc" ]
120 assert(false, "Need to add lots of conditions here")
125 "cursors/webcursor_ozone.cc",
126 "font_list_ozone.cc",
131 sources -= [ "cursors/webcursor_aura.cc" ]
134 if (!use_aura || !use_x11) {
135 sources -= [ "cursors/webcursor_aurax11.cc" ]
139 configs += [ "//build/config/linux:pangocairo" ]
141 # If we're using pango, never use this ozone file (it was removed in all
142 # non-ozone cases above).
143 sources -= [ "font_list_ozone.cc" ]
147 "font_list_pango.cc",
152 include_dirs += [ "//third_party/khronos" ]
153 configs += [ "//build/config/linux:xcomposite" ]
155 if (cpu_arch != "arm" || !is_chromeos) {
163 if (enable_plugins) {
165 "//ppapi:ppapi_shared",
169 "pepper_plugin_list.cc",
170 "pepper_plugin_list.h",
177 "gpu/media/android_video_decode_accelerator.cc",
178 "gpu/media/android_video_decode_accelerator.h",
181 # TODO(GYP) enable once supported in the GN build.
186 deps += [ "//third_party/libyuv" ]
190 if (is_chromeos && use_x11) {
191 if (cpu_arch == "arm") {
193 "gpu/media/exynos_v4l2_video_device.cc",
194 "gpu/media/exynos_v4l2_video_device.h",
195 "gpu/media/tegra_v4l2_video_device.cc",
196 "gpu/media/tegra_v4l2_video_device.h",
197 "gpu/media/v4l2_image_processor.cc",
198 "gpu/media/v4l2_image_processor.h",
199 "gpu/media/v4l2_video_decode_accelerator.cc",
200 "gpu/media/v4l2_video_decode_accelerator.h",
201 "gpu/media/v4l2_video_device.cc",
202 "gpu/media/v4l2_video_device.h",
203 "gpu/media/v4l2_video_encode_accelerator.cc",
204 "gpu/media/v4l2_video_encode_accelerator.h",
206 # TODO(GYP) enable once supported in the GN build.
207 #deps += [ "//media" ]
208 libs = [ "EGL", "GLESv2" ]
211 "gpu/media/h264_dpb.cc",
212 "gpu/media/h264_dpb.h",
213 "gpu/media/va_surface.h",
214 "gpu/media/vaapi_h264_decoder.cc",
215 "gpu/media/vaapi_h264_decoder.h",
216 "gpu/media/vaapi_video_decode_accelerator.cc",
217 "gpu/media/vaapi_video_decode_accelerator.h",
218 "gpu/media/vaapi_wrapper.cc",
219 "gpu/media/vaapi_wrapper.h",
221 assert(false, "Implement generate_stubs for libva")
227 "gpu/media/dxva_video_decode_accelerator.cc",
228 "gpu/media/dxva_video_decode_accelerator.h",
230 include_dirs += [ "//third_party/khronos" ]
232 # TODO(GYP) enable once supported in the GN build.
237 # TODO(GYP): extract_xinput action.
240 if (!is_win || !use_aura) {
241 sources -= [ "cursors/webcursor_aurawin.cc" ]
244 if (use_seccomp_bpf) {
245 defines += [ "USE_SECCOMP_BPF" ]
249 "sandbox_linux/bpf_cros_arm_gpu_policy_linux.cc",
250 "sandbox_linux/bpf_cros_arm_gpu_policy_linux.h",
251 "sandbox_linux/bpf_gpu_policy_linux.cc",
252 "sandbox_linux/bpf_gpu_policy_linux.h",
253 "sandbox_linux/bpf_ppapi_policy_linux.cc",
254 "sandbox_linux/bpf_ppapi_policy_linux.h",
255 "sandbox_linux/bpf_renderer_policy_linux.cc",
256 "sandbox_linux/bpf_renderer_policy_linux.h",
257 "sandbox_linux/bpf_utility_policy_linux.cc",
258 "sandbox_linux/bpf_utility_policy_linux.h",
259 "sandbox_linux/sandbox_bpf_base_policy_linux.cc",
260 "sandbox_linux/sandbox_bpf_base_policy_linux.h",
265 "sandbox_linux/android/sandbox_bpf_base_policy_android.cc",
266 "sandbox_linux/android/sandbox_bpf_base_policy_android.h",
272 mojom("mojo_bindings") {
274 "render_frame_setup.mojom",
278 "//mojo/public/interfaces/service_provider:service_provider",