Upstreaming browser/ui/uikit_ui_util from iOS.
[chromium-blink-merge.git] / content / renderer / BUILD.gn
blobe4a9a0b345e9261ad4e1924f612ac00032c0aba6
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/application/public/interfaces",
46     "//mojo/environment:chromium",
47     "//mojo/common:url_type_converters",
48     "//mojo/converters/geometry",
49     "//net",
50     "//skia",
51     "//skia/public",
52     "//storage/common",
53     "//third_party/icu",
54     "//third_party/libjingle",
55     "//third_party/mojo/src/mojo/edk/js",
56     "//third_party/mojo/src/mojo/public/cpp/bindings",
57     "//third_party/mojo/src/mojo/public/js",
58     "//third_party/npapi",
59     "//third_party/WebKit/public:blink",
60     "//third_party/widevine/cdm:version_h",
61     "//ui/accessibility",
62     "//ui/base",
63     "//ui/events:events_base",
64     "//ui/events:dom_keycode_converter",
65     "//ui/gl",
66     "//ui/native_theme",
67     "//ui/surface",
68     "//v8",
69   ]
71   if (is_mac) {
72     sources -= [
73       "webscrollbarbehavior_impl_gtkoraura.cc",
74       "webscrollbarbehavior_impl_gtkoraura.h",
75     ]
76     sources += [
77       "external_popup_menu.cc",
78       "external_popup_menu.h",
79     ]
80   }
82   if (is_android) {
83     sources -= [ "media/audio_decoder.cc" ]
84     sources += [
85       "external_popup_menu.cc",
86       "external_popup_menu.h",
87     ]
89     # Add back the Linux file which Android shares.
90     set_sources_assignment_filter([])
91     sources += [ "render_view_linux.cc" ]
93     deps += [
94       "//third_party/android_tools:cpu_features",
95       "//third_party/libphonenumber",
96     ]
97   } else {
98     sources -= [
99       "java/gin_java_bridge_dispatcher.cc",
100       "java/gin_java_bridge_dispatcher.h",
101       "java/gin_java_bridge_object.cc",
102       "java/gin_java_bridge_object.h",
103       "java/gin_java_bridge_value_converter.cc",
104       "java/gin_java_bridge_value_converter.h",
105       "java/gin_java_function_invocation_helper.cc",
106       "java/gin_java_function_invocation_helper.h",
107     ]
108   }
110   # TODO(jrg): remove the OS=="android" section?
111   # http://crbug.com/113172
112   # Understand better how media_stream_ is tied into Chromium.
113   if (!enable_webrtc && is_android) {
114     sources -= [
115       "media/media_stream_audio_level_calculator.cc",
116       "media/media_stream_audio_level_calculator.h",
117       "media/media_stream_center.h",
118       "media/media_stream_constraints_util.cc",
119       "media/media_stream_constraints_util.h",
120       "media/media_stream_dispatcher.h",
121       "media/media_stream_dispatcher_eventhandler.h",
122       "media/media_stream_track.cc",
123       "media/media_stream_track.h",
124     ]
125   }
127   if (enable_webrtc) {
128     sources += rebase_path(
129             content_renderer_gypi_values.private_renderer_webrtc_sources,
130             ".",
131             "//content")
132     deps += [
133       "//crypto",
134       "//third_party/libyuv",
135       "//third_party/webrtc/modules/audio_device",
136       "//third_party/webrtc/modules/audio_processing",
137       "//third_party/libjingle:libjingle_webrtc",
138       "//third_party/libjingle:libpeerconnection",
139       "//third_party/libjingle:libstunprober",
140     ]
141   } else {
142     sources += [
143       "media/webrtc_logging.h",
144       "media/webrtc_logging_noop.cc",
145     ]
146   }
148   if (enable_plugins) {
149     sources += rebase_path(
150             content_renderer_gypi_values.private_renderer_plugin_sources,
151             ".",
152             "//content")
153     deps += [
154       "//ppapi/host",
155       "//ppapi/proxy",
156       "//ppapi/shared_impl",
157       "//third_party/libvpx",
158       "//third_party/libyuv",
159     ]
160   } else {
161     # These files are in the WebRTC list, but also require plugins.
162     if (enable_webrtc) {
163       sources -= [
164         "media/webrtc/video_destination_handler.cc",
165         "media/webrtc/video_destination_handler.h",
166       ]
167     }
168   }
170   if (enable_plugins && enable_webrtc) {
171     sources += rebase_path(
172             content_renderer_gypi_values.private_renderer_plugin_webrtc_sources,
173             ".",
174             "//content")
175   }
177   if (!enable_pepper_cdms) {
178     sources -= [
179       "media/crypto/pepper_cdm_wrapper.h",
180       "media/crypto/pepper_cdm_wrapper_impl.cc",
181       "media/crypto/pepper_cdm_wrapper_impl.h",
182       "media/crypto/ppapi_decryptor.cc",
183       "media/crypto/ppapi_decryptor.h",
184     ]
185   }
187   if (enable_print_preview) {
188     deps += [ "//printing" ]
189   }
191   if (enable_browser_cdms) {
192     sources += [
193       "media/crypto/proxy_media_keys.cc",
194       "media/crypto/proxy_media_keys.h",
195       "media/crypto/renderer_cdm_manager.cc",
196       "media/crypto/renderer_cdm_manager.h",
197     ]
198   }
200   if (enable_mojo_media != "none") {
201     deps += [ "//media/mojo/services:proxy" ]
202   }
204   if (enable_webvr) {
205     sources += [
206       "vr/vr_dispatcher.cc",
207       "vr/vr_dispatcher.h",
208       "vr/vr_type_converters.cc",
209       "vr/vr_type_converters.h",
210     ]
211   }