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 the public target should depend on this. All other targets (even
12 # internal content ones) should depend on the public one.
13 visibility = [ "//content/public/common:common_sources" ]
15 sources = rebase_path(content_common_gypi_values.private_common_sources,
18 forward_dependent_configs_from = [
19 "//gpu/command_buffer/common",
20 "//third_party/WebKit/public:blink_headers",
24 "//content:content_implementation",
29 "//build/util:webkit_version",
30 "//components/tracing",
31 "//gpu/command_buffer/client:gles2_interface",
32 "//gpu/command_buffer/common",
43 "//third_party/WebKit/public:blink_headers",
44 "//third_party/libjingle",
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_cmd_helper",
57 "//gpu/command_buffer/client:gles2_implementation",
58 "//gpu/command_buffer/service",
60 "//gpu/skia_bindings",
62 "//media:shared_memory_support",
63 "//mojo/environment:chromium",
64 "//mojo/public/interfaces/application",
69 "//third_party/WebKit/public:blink",
71 "//webkit/common/gpu",
80 if (is_android && use_seccomp_bpf) {
81 set_sources_assignment_filter([])
83 "sandbox_linux/sandbox_bpf_base_policy_linux.cc",
84 "sandbox_linux/sandbox_bpf_base_policy_linux.h",
86 set_sources_assignment_filter(sources_assignment_filter)
91 "gpu/client/gpu_memory_buffer_impl_io_surface.cc",
92 "gpu/client/gpu_memory_buffer_impl_io_surface.h",
95 "plugin_list_posix.cc",
99 "//content/app/resources",
100 "//content:resources",
101 "//third_party/WebKit/public:resources",
103 libs += [ "QuartzCore.framework" ]
108 "gpu/client/gpu_memory_buffer_impl_surface_texture.cc",
109 "gpu/client/gpu_memory_buffer_impl_surface_texture.h",
113 "//content/public/android:jni",
114 "//content/public/android:common_aidl",
117 libs += [ "android" ]
121 sources -= [ "user_agent.cc" ]
122 assert(false, "Need to add lots of conditions here")
127 "cursors/webcursor_ozone.cc",
128 "font_list_ozone.cc",
129 "gpu/gpu_memory_buffer_factory_ozone.cc",
134 sources -= [ "cursors/webcursor_aura.cc" ]
137 if (!use_aura || !use_x11) {
138 sources -= [ "cursors/webcursor_aurax11.cc" ]
142 configs += [ "//build/config/linux:pangocairo" ]
144 # If we're using pango, never use this ozone file (it was removed in all
145 # non-ozone cases above).
146 sources -= [ "font_list_ozone.cc" ]
150 "font_list_pango.cc",
156 "gpu/gpu_memory_buffer_factory_x11_pixmap.cc",
157 "common/gpu/gpu_memory_buffer_factory_x11_pixmap.h",
159 include_dirs += [ "//third_party/khronos" ]
160 configs += [ "//build/config/linux:xcomposite" ]
162 if (cpu_arch != "arm" || !is_chromeos) {
170 "gpu/gpu_memory_buffer_factory_x11.cc",
174 if (enable_plugins) {
176 "//ppapi:ppapi_shared",
180 "pepper_file_util.cc",
181 "pepper_file_util.h",
183 "pepper_plugin_list.cc",
184 "pepper_plugin_list.h",
185 "pepper_renderer_instance_data.cc",
186 "pepper_renderer_instance_data.h",
189 "plugin_list_posix.cc",
196 "gpu/media/android_video_decode_accelerator.cc",
197 "gpu/media/android_video_decode_accelerator.h",
201 deps += [ "//third_party/libyuv" ]
205 if (is_chromeos && use_x11) {
206 if (cpu_arch == "arm") {
208 "gpu/media/exynos_v4l2_video_device.cc",
209 "gpu/media/exynos_v4l2_video_device.h",
210 "gpu/media/tegra_v4l2_video_device.cc",
211 "gpu/media/tegra_v4l2_video_device.h",
212 "gpu/media/v4l2_image_processor.cc",
213 "gpu/media/v4l2_image_processor.h",
214 "gpu/media/v4l2_video_decode_accelerator.cc",
215 "gpu/media/v4l2_video_decode_accelerator.h",
216 "gpu/media/v4l2_video_device.cc",
217 "gpu/media/v4l2_video_device.h",
218 "gpu/media/v4l2_video_encode_accelerator.cc",
219 "gpu/media/v4l2_video_encode_accelerator.h",
221 libs = [ "EGL", "GLESv2" ]
224 "gpu/media/h264_dpb.cc",
225 "gpu/media/h264_dpb.h",
226 "gpu/media/va_surface.h",
227 "gpu/media/vaapi_h264_decoder.cc",
228 "gpu/media/vaapi_h264_decoder.h",
229 "gpu/media/vaapi_video_decode_accelerator.cc",
230 "gpu/media/vaapi_video_decode_accelerator.h",
231 "gpu/media/vaapi_wrapper.cc",
232 "gpu/media/vaapi_wrapper.h",
234 assert(false, "Implement generate_stubs for libva")
240 "gpu/media/dxva_video_decode_accelerator.cc",
241 "gpu/media/dxva_video_decode_accelerator.h",
243 include_dirs += [ "//third_party/khronos" ]
248 # TODO(GYP): extract_xinput action.
251 if (!is_win || !use_aura) {
252 sources -= [ "cursors/webcursor_aurawin.cc" ]
255 if (use_seccomp_bpf) {
256 defines += [ "USE_SECCOMP_BPF" ]
260 "sandbox_linux/bpf_cros_arm_gpu_policy_linux.cc",
261 "sandbox_linux/bpf_cros_arm_gpu_policy_linux.h",
262 "sandbox_linux/bpf_gpu_policy_linux.cc",
263 "sandbox_linux/bpf_gpu_policy_linux.h",
264 "sandbox_linux/bpf_ppapi_policy_linux.cc",
265 "sandbox_linux/bpf_ppapi_policy_linux.h",
266 "sandbox_linux/bpf_renderer_policy_linux.cc",
267 "sandbox_linux/bpf_renderer_policy_linux.h",
268 "sandbox_linux/bpf_utility_policy_linux.cc",
269 "sandbox_linux/bpf_utility_policy_linux.h",
270 "sandbox_linux/sandbox_bpf_base_policy_linux.cc",
271 "sandbox_linux/sandbox_bpf_base_policy_linux.h",
276 "sandbox_linux/android/sandbox_bpf_base_policy_android.cc",
277 "sandbox_linux/android/sandbox_bpf_base_policy_android.h",
283 mojom("mojo_bindings") {
285 "render_frame_setup.mojom",
289 "//mojo/public/interfaces/application:application",