blob: 511027e3091aa356164b5e75cfcaf54465326173 [file] [log] [blame]
[email protected]df3ecfde2014-05-20 21:52:341# 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]7e4c33142014-05-21 22:01:325import("//build/config/features.gni")
6import("//build/config/ui.gni")
[email protected]df3ecfde2014-05-20 21:52:347import("//content/common/common.gni")
[email protected]189add52014-05-28 16:51:448import("//mojo/public/tools/bindings/mojom.gni")
[email protected]df3ecfde2014-05-20 21:52:349
10source_set("common") {
11 # Only targets in the content tree can depend directly on this target.
12 visibility = [ "//content/*" ]
13
14 sources = rebase_path(content_common_gypi_values.private_common_sources,
15 ".", "//content")
16
17 forward_dependent_configs_from = [
[email protected]4db51ec2014-05-29 21:08:3218 "//gpu/command_buffer/common",
19 "//third_party/WebKit/public:blink_headers",
[email protected]7e4c33142014-05-21 22:01:3220 ]
21
22 configs += [
[email protected]189add52014-05-28 16:51:4423 "//content:content_implementation",
[email protected]7e4c33142014-05-21 22:01:3224 "//content:libjingle_stub_config",
[email protected]df3ecfde2014-05-20 21:52:3425 ]
26
27 deps = [
28 "//base",
[email protected]7e4c33142014-05-21 22:01:3229 "//build/util:webkit_version",
[email protected]df3ecfde2014-05-20 21:52:3430 "//components/tracing",
31 "//gpu/command_buffer/common",
32 "//net",
33 "//skia",
34 "//third_party/icu",
35 "//ui/accessibility",
[email protected]52140d882014-05-30 19:22:4036 "//ui/base",
[email protected]df3ecfde2014-05-20 21:52:3437 "//ui/gfx",
38 "//ui/gfx/geometry",
39 "//url",
[email protected]4db51ec2014-05-29 21:08:3240 "//third_party/WebKit/public:blink_headers",
[email protected]df3ecfde2014-05-20 21:52:3441 # TODO(GYP) convert these dependencies.
[email protected]df3ecfde2014-05-20 21:52:3442 #'../third_party/libjingle/libjingle.gyp:libjingle',
43 #'../ui/shell_dialogs/shell_dialogs.gyp:shell_dialogs',
44 ]
[email protected]7e4c33142014-05-21 22:01:3245
46 if (!is_ios) {
47 deps += [
[email protected]824288842014-06-20 05:26:5948 "//cc",
[email protected]7e4c33142014-05-21 22:01:3249 "//ipc",
[email protected]824288842014-06-20 05:26:5950 "//mojo/environment:chromium",
51 "//mojo/system",
[email protected]7e4c33142014-05-21 22:01:3252 # TODO: the dependency on gl_in_process_context should be decoupled from
53 # content and moved to android_webview. See crbug.com/365797.
[email protected]824288842014-06-20 05:26:5954 "//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",
58 "//gpu/ipc",
59 "//ui/gl",
60 "//webkit/browser:storage",
61 "//webkit/common",
62 "//webkit/common:storage",
63 "//webkit/common/gpu",
[email protected]7e4c33142014-05-21 22:01:3264 #'../gpu/gpu.gyp:gl_in_process_context',
[email protected]7e4c33142014-05-21 22:01:3265 #'../gpu/skia_bindings/skia_bindings.gyp:gpu_skia_bindings',
66 #'../media/media.gyp:media',
67 #'../media/media.gyp:shared_memory_support',
[email protected]7e4c33142014-05-21 22:01:3268 #'../third_party/WebKit/public/blink.gyp:blink',
[email protected]7e4c33142014-05-21 22:01:3269 ]
70 }
71
[email protected]189add52014-05-28 16:51:4472 defines = []
[email protected]7e4c33142014-05-21 22:01:3273 include_dirs = []
[email protected]7e4c33142014-05-21 22:01:3274 libs = []
75 ldflags = []
76
77 if (is_android && use_seccomp_bpf) {
78 set_sources_assignment_filter([])
79 sources += [
80 "sandbox_linux/sandbox_bpf_base_policy_linux.cc",
81 "sandbox_linux/sandbox_bpf_base_policy_linux.h",
82 ]
83 set_sources_assignment_filter(sources_assignment_filter)
84 }
85
86 if (is_mac) {
87 sources += [
88 "gpu/client/gpu_memory_buffer_impl_io_surface.cc",
89 "gpu/client/gpu_memory_buffer_impl_io_surface.h",
90 ]
91 sources -= [
92 "plugin_list_posix.cc",
93 ]
94
95 # TODO(GYP) enable when converted to GN.
96 #deps += [
97 # "//webkit:webkit_resources",
98 #]
99 libs += [ "QuartzCore.framework" ]
100 }
101
102 if (is_android) {
103 sources += [
104 "gpu/client/gpu_memory_buffer_impl_surface_texture.cc",
105 "gpu/client/gpu_memory_buffer_impl_surface_texture.h",
106 ]
107
108 # TODO(GYP) enable when these targets are converted.
109 #deps += [
110 # "//content:content_jni_headers",
111 # "//content:common_aidl",
112 #]
113
114 libs += [ "android" ]
115 }
116
117 if (is_ios) {
118 sources -= [ "user_agent.cc" ]
119 assert(false, "Need to add lots of conditions here")
120 }
121
122 if (!use_ozone) {
123 sources -= [
124 "cursors/webcursor_ozone.cc",
125 "font_list_ozone.cc",
126 ]
127 }
128
129 if (!use_aura || !use_x11) {
130 sources -= [ "cursors/webcursor_aurax11.cc" ]
131 }
132
133 if (use_pango) {
134 configs += [ "//build/config/linux:pangocairo" ]
135 if (use_ozone) {
136 # If we're using pango, never use this ozone file (it was removed in all
137 # non-ozone cases above).
138 sources -= [ "font_list_ozone.cc" ]
139 }
140 } else {
141 sources -= [
142 "font_list_pango.cc",
143 ]
144 }
145
146 if (use_x11) {
147 include_dirs += [ "//third_party/khronos" ]
148 configs += [ "//build/config/linux:xcomposite" ]
149
[email protected]ed001e52014-05-24 02:27:54150 if (cpu_arch != "arm" || !is_chromeos) {
[email protected]7e4c33142014-05-21 22:01:32151 sources +=[
152 "gpu/x_util.cc",
153 "gpu/x_util.h",
154 ]
155 }
156 }
157
158 if (enable_plugins) {
159 deps += [
[email protected]824288842014-06-20 05:26:59160 "//ppapi:ppapi_shared",
[email protected]7e4c33142014-05-21 22:01:32161 ]
162 } else {
163 sources -= [
164 "pepper_plugin_list.cc",
165 "pepper_plugin_list.h",
166 "sandbox_util.cc",
167 ]
168 }
169
170 if (is_android) {
171 sources += [
172 "gpu/media/android_video_decode_accelerator.cc",
173 "gpu/media/android_video_decode_accelerator.h",
174 ]
175 deps += [
176 # TODO(GYP) enable once supported in the GN build.
177 #"//media",
178 ]
179
180 if (enable_webrtc) {
181 deps += [ "//third_party/libyuv" ]
182 }
183 }
184
185 if (is_chromeos && use_x11) {
186 if (cpu_arch == "arm") {
187 sources += [
188 "gpu/media/exynos_v4l2_video_device.cc",
189 "gpu/media/exynos_v4l2_video_device.h",
190 "gpu/media/tegra_v4l2_video_device.cc",
191 "gpu/media/tegra_v4l2_video_device.h",
192 "gpu/media/v4l2_image_processor.cc",
193 "gpu/media/v4l2_image_processor.h",
194 "gpu/media/v4l2_video_decode_accelerator.cc",
195 "gpu/media/v4l2_video_decode_accelerator.h",
196 "gpu/media/v4l2_video_device.cc",
197 "gpu/media/v4l2_video_device.h",
198 "gpu/media/v4l2_video_encode_accelerator.cc",
199 "gpu/media/v4l2_video_encode_accelerator.h",
200 ]
201 # TODO(GYP) enable once supported in the GN build.
202 #deps += [ "//media" ]
203 libs = [ "EGL", "GLESv2" ]
204 } else { # !arm
205 sources += [
206 "gpu/media/h264_dpb.cc",
207 "gpu/media/h264_dpb.h",
208 "gpu/media/va_surface.h",
209 "gpu/media/vaapi_h264_decoder.cc",
210 "gpu/media/vaapi_h264_decoder.h",
211 "gpu/media/vaapi_video_decode_accelerator.cc",
212 "gpu/media/vaapi_video_decode_accelerator.h",
213 "gpu/media/vaapi_wrapper.cc",
214 "gpu/media/vaapi_wrapper.h",
215 ]
216 assert(false, "Implement generate_stubs for libva")
217 }
218 }
219
220 if (is_win) {
221 sources += [
222 "gpu/media/dxva_video_decode_accelerator.cc",
223 "gpu/media/dxva_video_decode_accelerator.h",
224 ]
225 include_dirs += [ "//third_party/khronos" ]
226 deps += [
227 # TODO(GYP) enable once supported in the GN build.
228 #"//media",
229 "//ui/gl",
230 ]
231
232 # TODO(GYP): extract_xinput action.
233 }
234
235 if (!is_win || !use_aura) {
236 sources -= [ "cursors/webcursor_aurawin.cc" ]
237 }
[email protected]7e4c33142014-05-21 22:01:32238
239 if (use_seccomp_bpf) {
240 defines += [ "USE_SECCOMP_BPF" ]
241 } else {
242 if (is_linux) {
243 sources -= [
244 "sandbox_linux/bpf_cros_arm_gpu_policy_linux.cc",
245 "sandbox_linux/bpf_cros_arm_gpu_policy_linux.h",
246 "sandbox_linux/bpf_gpu_policy_linux.cc",
247 "sandbox_linux/bpf_gpu_policy_linux.h",
248 "sandbox_linux/bpf_ppapi_policy_linux.cc",
249 "sandbox_linux/bpf_ppapi_policy_linux.h",
250 "sandbox_linux/bpf_renderer_policy_linux.cc",
251 "sandbox_linux/bpf_renderer_policy_linux.h",
252 "sandbox_linux/sandbox_bpf_base_policy_linux.cc",
253 "sandbox_linux/sandbox_bpf_base_policy_linux.h",
254 ]
255 }
256 if (is_android) {
257 sources -= [
258 "sandbox_linux/android/sandbox_bpf_base_policy_android.cc",
259 "sandbox_linux/android/sandbox_bpf_base_policy_android.h",
260 ]
261 }
262 }
[email protected]df3ecfde2014-05-20 21:52:34263}
[email protected]7e4c33142014-05-21 22:01:32264
[email protected]189add52014-05-28 16:51:44265mojom("mojo_bindings") {
266 sources = [
267 "web_ui_setup.mojom",
268 ]
269}