third_party/re2: Remove remove-static-initializers.patch.
[chromium-blink-merge.git] / content / renderer / BUILD.gn
blobd4a17fb1daec317791971073d4a88a581899c084
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/scheduler:scheduler",
32     "//content:resources",
33     "//content/common:mojo_bindings",
34     "//content/public/child:child_sources",
35     "//content/public/common:common_sources",
36     "//content/public/common:mojo_bindings",
37     "//device/battery:mojo_bindings",
38     "//device/vibration:mojo_bindings",
39     "//gin",
40     "//gpu",
41     "//gpu/command_buffer/client:gles2_interface",
42     "//jingle:jingle_glue",
43     "//media",
44     "//media/blink",
45     "//mojo/environment:chromium",
46     "//net",
47     "//skia",
48     "//storage/common",
49     "//third_party/icu",
50     "//third_party/libjingle",
51     "//third_party/mojo/src/mojo/edk/js",
52     "//third_party/mojo/src/mojo/public/js",
53     "//third_party/mojo/src/mojo/public/interfaces/application",
54     "//third_party/npapi",
55     "//third_party/WebKit/public:blink",
56     "//third_party/widevine/cdm:version_h",
57     "//ui/accessibility",
58     "//ui/base",
59     "//ui/events:events_base",
60     "//ui/events:dom4_keycode_converter",
61     "//ui/gl",
62     "//ui/native_theme",
63     "//ui/surface",
64     "//v8",
65     "//webkit/common/gpu",
66   ]
68   if (is_mac) {
69     sources -= [
70       "webscrollbarbehavior_impl_gtkoraura.cc",
71       "webscrollbarbehavior_impl_gtkoraura.h",
72     ]
73     sources += [
74       "external_popup_menu.cc",
75       "external_popup_menu.h",
76     ]
77   }
79   if (is_android) {
80     sources -= [ "media/audio_decoder.cc" ]
81     sources += [
82       "external_popup_menu.cc",
83       "external_popup_menu.h",
84     ]
86     # Add back the Linux file which Android shares.
87     set_sources_assignment_filter([])
88     sources += [ "render_view_linux.cc" ]
90     deps += [
91       "//third_party/android_tools:cpu_features",
92       "//third_party/libphonenumber",
93     ]
94   } else {
95     sources -= [
96       "java/gin_java_bridge_dispatcher.cc",
97       "java/gin_java_bridge_dispatcher.h",
98       "java/gin_java_bridge_object.cc",
99       "java/gin_java_bridge_object.h",
100       "java/gin_java_bridge_value_converter.cc",
101       "java/gin_java_bridge_value_converter.h",
102       "java/gin_java_function_invocation_helper.cc",
103       "java/gin_java_function_invocation_helper.h",
104     ]
105   }
107   # TODO(jrg): remove the OS=="android" section?
108   # http://crbug.com/113172
109   # Understand better how media_stream_ is tied into Chromium.
110   if (!enable_webrtc && is_android) {
111     sources -= [
112       "media/media_stream_audio_level_calculator.cc",
113       "media/media_stream_audio_level_calculator.h",
114       "media/media_stream_audio_renderer.cc",
115       "media/media_stream_audio_renderer.h",
116       "media/media_stream_center.h",
117       "media/media_stream_constraints_util.cc",
118       "media/media_stream_constraints_util.h",
119       "media/media_stream_dispatcher.h",
120       "media/media_stream_dispatcher_eventhandler.h",
121       "media/media_stream_track.cc",
122       "media/media_stream_track.h",
123     ]
124   }
126   if (enable_webrtc) {
127     sources += rebase_path(
128             content_renderer_gypi_values.private_renderer_webrtc_sources,
129             ".",
130             "//content")
131     deps += [
132       "//crypto",
133       "//third_party/libyuv",
134       "//third_party/webrtc/modules/audio_device",
135       "//third_party/webrtc/modules/audio_processing",
136       "//third_party/libjingle:libjingle_webrtc",
137       "//third_party/libjingle:libpeerconnection",
138     ]
139   } else {
140     sources += [
141       "media/webrtc_logging.h",
142       "media/webrtc_logging_noop.cc",
143     ]
144   }
146   if (enable_plugins) {
147     sources += rebase_path(
148             content_renderer_gypi_values.private_renderer_plugin_sources,
149             ".",
150             "//content")
151     deps += [
152       "//media/cast:sender",
153       "//ppapi/host",
154       "//ppapi/proxy",
155       "//ppapi/shared_impl",
156       "//third_party/libyuv",
157     ]
158   } else {
159     # These files are in the WebRTC list, but also require plugins.
160     if (enable_webrtc) {
161       sources -= [
162         "media/webrtc/video_destination_handler.cc",
163         "media/webrtc/video_destination_handler.h",
164       ]
165     }
166   }
168   if (enable_plugins && enable_webrtc) {
169     sources += rebase_path(
170             content_renderer_gypi_values.private_renderer_plugin_webrtc_sources,
171             ".",
172             "//content")
173   }
175   if (!enable_pepper_cdms) {
176     sources -= [
177       "media/crypto/pepper_cdm_wrapper.h",
178       "media/crypto/pepper_cdm_wrapper_impl.cc",
179       "media/crypto/pepper_cdm_wrapper_impl.h",
180       "media/crypto/ppapi_decryptor.cc",
181       "media/crypto/ppapi_decryptor.h",
182     ]
183   }
185   if (enable_print_preview) {
186     deps += [ "//printing" ]
187   }
189   if (enable_browser_cdms) {
190     sources += [
191       "media/crypto/proxy_media_keys.cc",
192       "media/crypto/proxy_media_keys.h",
193       "media/crypto/renderer_cdm_manager.cc",
194       "media/crypto/renderer_cdm_manager.h",
195     ]
196   }
198   if (enable_media_mojo_renderer) {
199     sources += [
200       "media/media_renderer_service_provider.cc",
201       "media/media_renderer_service_provider.h",
202     ]
203     deps += [ "//media/mojo/services:renderer_proxy" ]
204   }