[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 | |
| 5 | # TODO(brettw) this file is a work in progress, it is not currently hooked up |
| 6 | # to the build, but currently represents the state of content/common's deps. |
| 7 | |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame^] | 8 | import("//build/config/features.gni") |
| 9 | import("//build/config/ui.gni") |
[email protected] | df3ecfde | 2014-05-20 21:52:34 | [diff] [blame] | 10 | import("//content/common/common.gni") |
| 11 | |
| 12 | source_set("common") { |
| 13 | # Only targets in the content tree can depend directly on this target. |
| 14 | visibility = [ "//content/*" ] |
| 15 | |
| 16 | sources = rebase_path(content_common_gypi_values.private_common_sources, |
| 17 | ".", "//content") |
| 18 | |
| 19 | forward_dependent_configs_from = [ |
| 20 | # TODO(GYP) convert these dependencies. |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame^] | 21 | #"//third_party/WebKit/public:blink_headers", |
| 22 | ] |
| 23 | |
| 24 | configs += [ |
| 25 | "//content:blink_headers_stub_config", |
| 26 | "//content:libjingle_stub_config", |
[email protected] | df3ecfde | 2014-05-20 21:52:34 | [diff] [blame] | 27 | ] |
| 28 | |
| 29 | deps = [ |
| 30 | "//base", |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame^] | 31 | "//build/util:webkit_version", |
[email protected] | df3ecfde | 2014-05-20 21:52:34 | [diff] [blame] | 32 | "//components/tracing", |
| 33 | "//gpu/command_buffer/common", |
| 34 | "//net", |
| 35 | "//skia", |
| 36 | "//third_party/icu", |
| 37 | "//ui/accessibility", |
| 38 | "//ui/base:ui_base", |
| 39 | "//ui/gfx", |
| 40 | "//ui/gfx/geometry", |
| 41 | "//url", |
| 42 | # TODO(GYP) convert these dependencies. |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame^] | 43 | #"//third_party/WebKit/public:blink_headers", |
[email protected] | df3ecfde | 2014-05-20 21:52:34 | [diff] [blame] | 44 | #'../third_party/libjingle/libjingle.gyp:libjingle', |
| 45 | #'../ui/shell_dialogs/shell_dialogs.gyp:shell_dialogs', |
| 46 | ] |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame^] | 47 | |
| 48 | if (!is_ios) { |
| 49 | deps += [ |
| 50 | "//ipc", |
| 51 | "//gpu/command_buffer/client:gles2_c_lib", |
| 52 | "//gpu/command_buffer/client:gles2_implementation", |
| 53 | "//ui/gl", |
| 54 | #'../cc/cc.gyp:cc', |
| 55 | #'../gpu/gpu.gyp:command_buffer_service', |
| 56 | # TODO: the dependency on gl_in_process_context should be decoupled from |
| 57 | # content and moved to android_webview. See crbug.com/365797. |
| 58 | #'../gpu/gpu.gyp:gl_in_process_context', |
| 59 | #'../gpu/gpu.gyp:gpu_ipc', |
| 60 | #'../gpu/skia_bindings/skia_bindings.gyp:gpu_skia_bindings', |
| 61 | #'../media/media.gyp:media', |
| 62 | #'../media/media.gyp:shared_memory_support', |
| 63 | #'../mojo/mojo.gyp:mojo_environment_chromium', |
| 64 | #'../mojo/mojo.gyp:mojo_system_impl', |
| 65 | #'../third_party/WebKit/public/blink.gyp:blink', |
| 66 | #'../webkit/common/gpu/webkit_gpu.gyp:webkit_gpu', |
| 67 | #'../webkit/common/webkit_common.gyp:webkit_common', |
| 68 | #'../webkit/storage_browser.gyp:webkit_storage_browser', |
| 69 | #'../webkit/storage_common.gyp:webkit_storage_common', |
| 70 | ] |
| 71 | } |
| 72 | |
| 73 | include_dirs = [] |
| 74 | defines = [ "CONTENT_IMPLEMENTATION" ] |
| 75 | libs = [] |
| 76 | ldflags = [] |
| 77 | |
| 78 | if (is_android && use_seccomp_bpf) { |
| 79 | set_sources_assignment_filter([]) |
| 80 | sources += [ |
| 81 | "sandbox_linux/sandbox_bpf_base_policy_linux.cc", |
| 82 | "sandbox_linux/sandbox_bpf_base_policy_linux.h", |
| 83 | ] |
| 84 | set_sources_assignment_filter(sources_assignment_filter) |
| 85 | } |
| 86 | |
| 87 | if (is_mac) { |
| 88 | sources += [ |
| 89 | "gpu/client/gpu_memory_buffer_impl_io_surface.cc", |
| 90 | "gpu/client/gpu_memory_buffer_impl_io_surface.h", |
| 91 | ] |
| 92 | sources -= [ |
| 93 | "plugin_list_posix.cc", |
| 94 | ] |
| 95 | |
| 96 | # TODO(GYP) enable when converted to GN. |
| 97 | #deps += [ |
| 98 | # "//webkit:webkit_resources", |
| 99 | #] |
| 100 | libs += [ "QuartzCore.framework" ] |
| 101 | } |
| 102 | |
| 103 | if (is_android) { |
| 104 | sources += [ |
| 105 | "gpu/client/gpu_memory_buffer_impl_surface_texture.cc", |
| 106 | "gpu/client/gpu_memory_buffer_impl_surface_texture.h", |
| 107 | ] |
| 108 | |
| 109 | # TODO(GYP) enable when these targets are converted. |
| 110 | #deps += [ |
| 111 | # "//content:content_jni_headers", |
| 112 | # "//content:common_aidl", |
| 113 | #] |
| 114 | |
| 115 | libs += [ "android" ] |
| 116 | } |
| 117 | |
| 118 | if (is_ios) { |
| 119 | sources -= [ "user_agent.cc" ] |
| 120 | assert(false, "Need to add lots of conditions here") |
| 121 | } |
| 122 | |
| 123 | if (!use_ozone) { |
| 124 | sources -= [ |
| 125 | "cursors/webcursor_ozone.cc", |
| 126 | "font_list_ozone.cc", |
| 127 | ] |
| 128 | } |
| 129 | |
| 130 | if (!use_aura || !use_x11) { |
| 131 | sources -= [ "cursors/webcursor_aurax11.cc" ] |
| 132 | } |
| 133 | |
| 134 | if (use_pango) { |
| 135 | configs += [ "//build/config/linux:pangocairo" ] |
| 136 | if (use_ozone) { |
| 137 | # If we're using pango, never use this ozone file (it was removed in all |
| 138 | # non-ozone cases above). |
| 139 | sources -= [ "font_list_ozone.cc" ] |
| 140 | } |
| 141 | } else { |
| 142 | sources -= [ |
| 143 | "font_list_pango.cc", |
| 144 | ] |
| 145 | } |
| 146 | |
| 147 | if (use_x11) { |
| 148 | include_dirs += [ "//third_party/khronos" ] |
| 149 | configs += [ "//build/config/linux:xcomposite" ] |
| 150 | |
| 151 | if (cpu_arch != "arm" || !is_chromos) { |
| 152 | sources +=[ |
| 153 | "gpu/x_util.cc", |
| 154 | "gpu/x_util.h", |
| 155 | ] |
| 156 | } |
| 157 | } |
| 158 | |
| 159 | if (enable_plugins) { |
| 160 | deps += [ |
| 161 | # TODO(GYP) enable once supported in the GN build. |
| 162 | #"//ppapi:shared", |
| 163 | ] |
| 164 | } else { |
| 165 | sources -= [ |
| 166 | "pepper_plugin_list.cc", |
| 167 | "pepper_plugin_list.h", |
| 168 | "sandbox_util.cc", |
| 169 | ] |
| 170 | } |
| 171 | |
| 172 | if (is_android) { |
| 173 | sources += [ |
| 174 | "gpu/media/android_video_decode_accelerator.cc", |
| 175 | "gpu/media/android_video_decode_accelerator.h", |
| 176 | ] |
| 177 | deps += [ |
| 178 | # TODO(GYP) enable once supported in the GN build. |
| 179 | #"//media", |
| 180 | ] |
| 181 | |
| 182 | if (enable_webrtc) { |
| 183 | deps += [ "//third_party/libyuv" ] |
| 184 | } |
| 185 | } |
| 186 | |
| 187 | if (is_chromeos && use_x11) { |
| 188 | if (cpu_arch == "arm") { |
| 189 | sources += [ |
| 190 | "gpu/media/exynos_v4l2_video_device.cc", |
| 191 | "gpu/media/exynos_v4l2_video_device.h", |
| 192 | "gpu/media/tegra_v4l2_video_device.cc", |
| 193 | "gpu/media/tegra_v4l2_video_device.h", |
| 194 | "gpu/media/v4l2_image_processor.cc", |
| 195 | "gpu/media/v4l2_image_processor.h", |
| 196 | "gpu/media/v4l2_video_decode_accelerator.cc", |
| 197 | "gpu/media/v4l2_video_decode_accelerator.h", |
| 198 | "gpu/media/v4l2_video_device.cc", |
| 199 | "gpu/media/v4l2_video_device.h", |
| 200 | "gpu/media/v4l2_video_encode_accelerator.cc", |
| 201 | "gpu/media/v4l2_video_encode_accelerator.h", |
| 202 | ] |
| 203 | # TODO(GYP) enable once supported in the GN build. |
| 204 | #deps += [ "//media" ] |
| 205 | libs = [ "EGL", "GLESv2" ] |
| 206 | } else { # !arm |
| 207 | sources += [ |
| 208 | "gpu/media/h264_dpb.cc", |
| 209 | "gpu/media/h264_dpb.h", |
| 210 | "gpu/media/va_surface.h", |
| 211 | "gpu/media/vaapi_h264_decoder.cc", |
| 212 | "gpu/media/vaapi_h264_decoder.h", |
| 213 | "gpu/media/vaapi_video_decode_accelerator.cc", |
| 214 | "gpu/media/vaapi_video_decode_accelerator.h", |
| 215 | "gpu/media/vaapi_wrapper.cc", |
| 216 | "gpu/media/vaapi_wrapper.h", |
| 217 | ] |
| 218 | assert(false, "Implement generate_stubs for libva") |
| 219 | } |
| 220 | } |
| 221 | |
| 222 | if (is_win) { |
| 223 | sources += [ |
| 224 | "gpu/media/dxva_video_decode_accelerator.cc", |
| 225 | "gpu/media/dxva_video_decode_accelerator.h", |
| 226 | ] |
| 227 | include_dirs += [ "//third_party/khronos" ] |
| 228 | deps += [ |
| 229 | # TODO(GYP) enable once supported in the GN build. |
| 230 | #"//media", |
| 231 | "//ui/gl", |
| 232 | ] |
| 233 | |
| 234 | # TODO(GYP): extract_xinput action. |
| 235 | } |
| 236 | |
| 237 | if (!is_win || !use_aura) { |
| 238 | sources -= [ "cursors/webcursor_aurawin.cc" ] |
| 239 | } |
| 240 | if (!use_aura || !use_x11) { |
| 241 | sources -= [ "cursors/webcursor_aurax11.cc" ] |
| 242 | } |
| 243 | |
| 244 | if (use_seccomp_bpf) { |
| 245 | defines += [ "USE_SECCOMP_BPF" ] |
| 246 | } else { |
| 247 | if (is_linux) { |
| 248 | sources -= [ |
| 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/sandbox_bpf_base_policy_linux.cc", |
| 258 | "sandbox_linux/sandbox_bpf_base_policy_linux.h", |
| 259 | ] |
| 260 | } |
| 261 | if (is_android) { |
| 262 | sources -= [ |
| 263 | "sandbox_linux/android/sandbox_bpf_base_policy_android.cc", |
| 264 | "sandbox_linux/android/sandbox_bpf_base_policy_android.h", |
| 265 | ] |
| 266 | } |
| 267 | } |
[email protected] | df3ecfde | 2014-05-20 21:52:34 | [diff] [blame] | 268 | } |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame^] | 269 | |