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 import("//build/config/features.gni") 6 import("//build/config/ui.gni") 7 import("//content/renderer/renderer.gni") 8 import("//media/media_options.gni") 9 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" ] 14 15 sources = rebase_path(content_renderer_gypi_values.private_renderer_sources, 16 ".", "//content") 17 18 configs += [ 19 "//content:content_implementation", 20 ] 21 22 deps = [ 23 # TODO(GYP) bug 376846 remove this. This should be inherited from //net but 24 # those don't cross component boundaries. 25 "//crypto:platform", 26 27 "//base/allocator", 28 "//cc", 29 "//cc/blink", 30 "//content:resources", 31 "//content/common:mojo_bindings", 32 "//content/public/child:child_sources", 33 "//content/public/common:common_sources", 34 "//gin", 35 "//gpu", 36 "//gpu/command_buffer/client:gles2_interface", 37 "//jingle:jingle_glue", 38 "//media", 39 "//media/blink", 40 "//mojo/bindings/js", 41 "//mojo/environment:chromium", 42 "//mojo/public/js/bindings", 43 "//mojo/public/interfaces/application", 44 "//net", 45 "//skia", 46 "//storage/common", 47 "//third_party/icu", 48 "//third_party/libjingle", 49 "//third_party/npapi", 50 "//third_party/WebKit/public:blink", 51 "//third_party/widevine/cdm:version_h", 52 "//ui/accessibility", 53 "//ui/base", 54 "//ui/events:events_base", 55 "//ui/events:dom4_keycode_converter", 56 "//ui/gl", 57 "//ui/native_theme", 58 "//ui/surface", 59 "//v8", 60 "//webkit/common/gpu", 61 ] 62 63 if (!enable_notifications) { 64 sources -= [ 65 "notification_provider.cc", 66 "active_notification_tracker.cc", 67 ] 68 } 69 70 if (is_mac) { 71 sources -= [ 72 "webscrollbarbehavior_impl_gtkoraura.cc", 73 "webscrollbarbehavior_impl_gtkoraura.h", 74 ] 75 sources += [ 76 "external_popup_menu.cc", 77 "external_popup_menu.h", 78 ] 79 } 80 81 if (is_android) { 82 sources -= [ 83 "accessibility/renderer_accessibility_focus_only.cc", 84 "media/audio_decoder.cc", 85 "media/crypto/encrypted_media_player_support_impl.cc", 86 ] 87 sources += [ 88 "external_popup_menu.cc", 89 "external_popup_menu.h", 90 ] 91 92 # Add back the Linux file which Android shares. 93 set_sources_assignment_filter([]) 94 sources += [ 95 "render_view_linux.cc", 96 ] 97 98 deps += [ 99 "//third_party/android_tools:cpu_features", 100 "//third_party/libphonenumber", 101 ] 102 } else { 103 sources -= [ 104 "java/gin_java_bridge_dispatcher.cc", 105 "java/gin_java_bridge_dispatcher.h", 106 "java/gin_java_bridge_object.cc", 107 "java/gin_java_bridge_object.h", 108 "java/gin_java_bridge_value_converter.cc", 109 "java/gin_java_bridge_value_converter.h", 110 ] 111 } 112 113 # TODO(jrg): remove the OS=="android" section? 114 # http://crbug.com/113172 115 # Understand better how media_stream_ is tied into Chromium. 116 if (!enable_webrtc && is_android) { 117 sources -= [ 118 "media/media_stream_audio_level_calculator.cc", 119 "media/media_stream_audio_level_calculator.h", 120 "media/media_stream_audio_renderer.cc", 121 "media/media_stream_audio_renderer.h", 122 "media/media_stream_center.h", 123 "media/media_stream_constraints_util.cc", 124 "media/media_stream_constraints_util.h", 125 "media/media_stream_dispatcher.h", 126 "media/media_stream_dispatcher_eventhandler.h", 127 "media/media_stream_track.cc", 128 "media/media_stream_track.h", 129 ] 130 } 131 132 if (enable_webrtc) { 133 sources += rebase_path( 134 content_renderer_gypi_values.private_renderer_webrtc_sources, 135 ".", "//content") 136 deps += [ 137 "//crypto", 138 "//third_party/libyuv", 139 "//third_party/webrtc/modules/audio_device", 140 "//third_party/webrtc/modules/audio_processing", 141 "//third_party/libjingle:libjingle_webrtc", 142 "//third_party/libjingle:libpeerconnection", 143 ] 144 } else { 145 sources += [ 146 "media/webrtc_logging_noop.cc", 147 "media/webrtc_logging.h", 148 ] 149 } 150 151 if (enable_plugins) { 152 sources += rebase_path( 153 content_renderer_gypi_values.private_renderer_plugin_sources, 154 ".", "//content") 155 deps += [ 156 "//ppapi:ppapi_host", 157 "//ppapi:ppapi_proxy", 158 "//ppapi:ppapi_shared", 159 "//third_party/libyuv", 160 ] 161 } else { 162 # These files are in the WebRTC list, but also require plugins. 163 if (enable_webrtc) { 164 sources -= [ 165 "media/webrtc/video_destination_handler.cc", 166 "media/webrtc/video_destination_handler.h", 167 ] 168 } 169 } 170 171 if (enable_plugins && enable_webrtc) { 172 sources += rebase_path( 173 content_renderer_gypi_values.private_renderer_plugin_webrtc_sources, 174 ".", "//content") 175 } 176 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 } 186 187 if (printing_mode == 1) { 188 deps += [ "//printing" ] 189 } 190 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 } 199 } 200