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