Roll src/third_party/WebKit 9d2dfea:3aea697 (svn 201972:201973)
[chromium-blink-merge.git] / content / renderer / BUILD.gn
blob6ce9aa08d842a307e54ab3938de814f6ca69edc1
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/renderer/renderer.gni")
8 import("//media/media_options.gni")
10 source_set("renderer") {
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/renderer:renderer_sources" ]
15   sources = rebase_path(content_renderer_gypi_values.private_renderer_sources,
16                         ".",
17                         "//content")
19   configs += [
20     "//content:content_implementation",
21     "//build/config/compiler:no_size_t_to_int_warning",
22   ]
24   deps = [
25     # TODO(GYP) bug 376846 remove this. This should be inherited from //net but
26     # those don't cross component boundaries.
27     "//crypto:platform",
28     "//base/allocator",
29     "//cc",
30     "//cc/blink",
31     "//components/url_formatter",
32     "//components/scheduler:scheduler",
33     "//content:resources",
34     "//content/common:mojo_bindings",
35     "//content/public/child:child_sources",
36     "//content/public/common:common_sources",
37     "//content/public/common:mojo_bindings",
38     "//device/battery:mojo_bindings",
39     "//device/vibration:mojo_bindings",
40     "//gin",
41     "//gpu",
42     "//gpu/command_buffer/client:gles2_interface",
43     "//jingle:jingle_glue",
44     "//media",
45     "//media/blink",
46     "//mojo/application/public/interfaces",
47     "//mojo/environment:chromium",
48     "//mojo/common:url_type_converters",
49     "//mojo/converters/geometry",
50     "//net",
51     "//skia",
52     "//skia/public",
53     "//storage/common",
54     "//third_party/icu",
55     "//third_party/libjingle",
56     "//third_party/mojo/src/mojo/edk/js",
57     "//third_party/mojo/src/mojo/public/cpp/bindings",
58     "//third_party/mojo/src/mojo/public/js",
59     "//third_party/npapi",
60     "//third_party/WebKit/public:blink",
61     "//third_party/widevine/cdm:version_h",
62     "//ui/accessibility",
63     "//ui/base",
64     "//ui/events:events_base",
65     "//ui/events:dom_keycode_converter",
66     "//ui/gl",
67     "//ui/native_theme",
68     "//ui/surface",
69     "//v8",
70   ]
72   if (is_mac) {
73     sources -= [
74       "webscrollbarbehavior_impl_gtkoraura.cc",
75       "webscrollbarbehavior_impl_gtkoraura.h",
76     ]
77     sources += [
78       "external_popup_menu.cc",
79       "external_popup_menu.h",
80     ]
81   }
83   if (is_android) {
84     sources -= [
85       "media/audio_decoder.cc",
86       "usb/type_converters.cc",
87       "usb/type_converters.h",
88       "usb/web_usb_client_impl.cc",
89       "usb/web_usb_client_impl.h",
90       "usb/web_usb_device_impl.cc",
91       "usb/web_usb_device_impl.h",
92     ]
93     sources += [
94       "external_popup_menu.cc",
95       "external_popup_menu.h",
96     ]
98     # Add back the Linux file which Android shares.
99     set_sources_assignment_filter([])
100     sources += [ "render_view_linux.cc" ]
102     deps += [
103       "//third_party/android_tools:cpu_features",
104       "//third_party/libphonenumber",
105     ]
106   } else {
107     sources -= [
108       "java/gin_java_bridge_dispatcher.cc",
109       "java/gin_java_bridge_dispatcher.h",
110       "java/gin_java_bridge_object.cc",
111       "java/gin_java_bridge_object.h",
112       "java/gin_java_bridge_value_converter.cc",
113       "java/gin_java_bridge_value_converter.h",
114       "java/gin_java_function_invocation_helper.cc",
115       "java/gin_java_function_invocation_helper.h",
116     ]
118     deps += [
119       "//device/devices_app/public/cpp",
120       "//device/devices_app/usb/public/interfaces",
121     ]
122   }
124   # TODO(jrg): remove the OS=="android" section?
125   # http://crbug.com/113172
126   # Understand better how media_stream_ is tied into Chromium.
127   if (!enable_webrtc && is_android) {
128     sources -= [
129       "media/media_stream_audio_level_calculator.cc",
130       "media/media_stream_audio_level_calculator.h",
131       "media/media_stream_center.h",
132       "media/media_stream_constraints_util.cc",
133       "media/media_stream_constraints_util.h",
134       "media/media_stream_dispatcher.h",
135       "media/media_stream_dispatcher_eventhandler.h",
136       "media/media_stream_track.cc",
137       "media/media_stream_track.h",
138     ]
139   }
141   if (enable_webrtc) {
142     sources += rebase_path(
143             content_renderer_gypi_values.private_renderer_webrtc_sources,
144             ".",
145             "//content")
146     deps += [
147       "//crypto",
148       "//third_party/libyuv",
149       "//third_party/webrtc/modules/audio_device",
150       "//third_party/webrtc/modules/audio_processing",
151       "//third_party/libjingle:libjingle_webrtc",
152       "//third_party/libjingle:libpeerconnection",
153       "//third_party/libjingle:libstunprober",
154     ]
155   } else {
156     sources += [
157       "media/webrtc_logging.h",
158       "media/webrtc_logging_noop.cc",
159     ]
160   }
162   if (enable_plugins) {
163     sources += rebase_path(
164             content_renderer_gypi_values.private_renderer_plugin_sources,
165             ".",
166             "//content")
167     deps += [
168       "//ppapi/host",
169       "//ppapi/proxy",
170       "//ppapi/shared_impl",
171       "//third_party/libvpx",
172       "//third_party/libyuv",
173     ]
174   }
176   if (enable_plugins && enable_webrtc) {
177     sources += rebase_path(
178             content_renderer_gypi_values.private_renderer_plugin_webrtc_sources,
179             ".",
180             "//content")
181   }
183   if (!enable_pepper_cdms) {
184     sources -= [
185       "media/crypto/pepper_cdm_wrapper.h",
186       "media/crypto/pepper_cdm_wrapper_impl.cc",
187       "media/crypto/pepper_cdm_wrapper_impl.h",
188       "media/crypto/ppapi_decryptor.cc",
189       "media/crypto/ppapi_decryptor.h",
190     ]
191   }
193   if (enable_print_preview) {
194     deps += [ "//printing" ]
195   }
197   if (enable_browser_cdms) {
198     sources += [
199       "media/crypto/proxy_media_keys.cc",
200       "media/crypto/proxy_media_keys.h",
201       "media/crypto/renderer_cdm_manager.cc",
202       "media/crypto/renderer_cdm_manager.h",
203     ]
204   }
206   if (enable_mojo_media != "none") {
207     deps += [ "//media/mojo/services:proxy" ]
208   }
210   if (enable_webvr) {
211     sources += [
212       "vr/vr_dispatcher.cc",
213       "vr/vr_dispatcher.h",
214       "vr/vr_type_converters.cc",
215       "vr/vr_type_converters.h",
216     ]
217   }