# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import("//build/config/chromecast_build.gni") import("//build/config/features.gni") import("//build/config/jumbo.gni") import("//build/config/ui.gni") import("//content/common/features.gni") import("//media/media_options.gni") import("//ppapi/buildflags/buildflags.gni") import("//printing/buildflags/buildflags.gni") import("//third_party/webrtc/webrtc.gni") import("//tools/ipc_fuzzer/ipc_fuzzer.gni") if (is_component_build) { link_target_type = "jumbo_source_set" } else { link_target_type = "jumbo_static_library" } target(link_target_type, "renderer") { # Only the public target should depend on this. All other targets (even # internal content ones) should depend on the public one. visibility = [ ":for_content_tests", "//content/app:*", "//content/public/renderer:renderer_sources", "//content/renderer:audio_decoder_fuzzer", "//chromecast/media/audio:*", ] sources = [ "accessibility/aom_content_ax_tree.cc", "accessibility/aom_content_ax_tree.h", "accessibility/ax_action_target_factory.cc", "accessibility/ax_action_target_factory.h", "accessibility/ax_image_annotator.cc", "accessibility/ax_image_annotator.h", "accessibility/ax_image_stopwords.cc", "accessibility/ax_image_stopwords.h", "accessibility/blink_ax_action_target.cc", "accessibility/blink_ax_action_target.h", "accessibility/blink_ax_tree_source.cc", "accessibility/blink_ax_tree_source.h", "accessibility/render_accessibility_impl.cc", "accessibility/render_accessibility_impl.h", "accessibility/render_accessibility_manager.cc", "accessibility/render_accessibility_manager.h", "android/synchronous_layer_tree_frame_sink_impl.cc", "android/synchronous_layer_tree_frame_sink_impl.h", "browser_exposed_renderer_interfaces.cc", "browser_exposed_renderer_interfaces.h", "categorized_worker_pool.cc", "categorized_worker_pool.h", "child_frame_compositing_helper.cc", "child_frame_compositing_helper.h", "child_frame_compositor.h", "compositor/compositor_dependencies.h", "content_security_policy_util.cc", "content_security_policy_util.h", "context_menu_params_builder.cc", "context_menu_params_builder.h", "crash_helpers.cc", "crash_helpers.h", "discardable_memory_utils.cc", "discardable_memory_utils.h", "dom_automation_controller.cc", "dom_automation_controller.h", "drop_data_builder.cc", "drop_data_builder.h", "effective_connection_type_helper.cc", "effective_connection_type_helper.h", "frame_blame_context.cc", "frame_blame_context.h", "frame_owner_properties_converter.cc", "frame_owner_properties_converter.h", "frame_swap_message_queue.cc", "frame_swap_message_queue.h", "gpu_benchmarking_extension.cc", "gpu_benchmarking_extension.h", "history_entry.cc", "history_entry.h", "history_serialization.cc", "history_serialization.h", "ime_event_guard.cc", "ime_event_guard.h", "impression_conversions.cc", "impression_conversions.h", "in_process_renderer_thread.cc", "in_process_renderer_thread.h", "input/frame_input_handler_impl.cc", "input/frame_input_handler_impl.h", "input/input_event_prediction.cc", "input/input_event_prediction.h", "input/input_target_client_impl.cc", "input/input_target_client_impl.h", "input/main_thread_event_queue.cc", "input/main_thread_event_queue.h", "input/main_thread_event_queue_task.h", "input/main_thread_event_queue_task_list.cc", "input/main_thread_event_queue_task_list.h", "input/widget_input_handler_impl.cc", "input/widget_input_handler_impl.h", "input/widget_input_handler_manager.cc", "input/widget_input_handler_manager.h", "internal_document_state_data.cc", "internal_document_state_data.h", "java/gin_java_bridge_dispatcher.cc", "java/gin_java_bridge_dispatcher.h", "java/gin_java_bridge_object.cc", "java/gin_java_bridge_object.h", "java/gin_java_bridge_value_converter.cc", "java/gin_java_bridge_value_converter.h", "java/gin_java_function_invocation_helper.cc", "java/gin_java_function_invocation_helper.h", "loader/child_url_loader_factory_bundle.cc", "loader/child_url_loader_factory_bundle.h", "loader/code_cache_loader_impl.cc", "loader/code_cache_loader_impl.h", "loader/frame_request_blocker.cc", "loader/frame_request_blocker.h", "loader/internet_disconnected_web_url_loader.cc", "loader/internet_disconnected_web_url_loader.h", "loader/navigation_body_loader.cc", "loader/navigation_body_loader.h", "loader/navigation_response_override_parameters.cc", "loader/navigation_response_override_parameters.h", "loader/request_extra_data.cc", "loader/request_extra_data.h", "loader/resource_dispatcher.cc", "loader/resource_dispatcher.h", "loader/resource_load_stats.cc", "loader/resource_load_stats.h", "loader/sync_load_context.cc", "loader/sync_load_context.h", "loader/sync_load_response.cc", "loader/sync_load_response.h", "loader/tracked_child_url_loader_factory_bundle.cc", "loader/tracked_child_url_loader_factory_bundle.h", "loader/url_loader_client_impl.cc", "loader/url_loader_client_impl.h", "loader/web_url_loader_impl.cc", "loader/web_url_loader_impl.h", "loader/web_url_request_util.cc", "loader/web_url_request_util.h", "loader/web_worker_fetch_context_impl.cc", "loader/web_worker_fetch_context_impl.h", "media/android/flinging_renderer_client.cc", "media/android/flinging_renderer_client.h", "media/android/flinging_renderer_client_factory.cc", "media/android/flinging_renderer_client_factory.h", "media/android/media_player_renderer_client.cc", "media/android/media_player_renderer_client.h", "media/android/media_player_renderer_client_factory.cc", "media/android/media_player_renderer_client_factory.h", "media/android/stream_texture_factory.cc", "media/android/stream_texture_factory.h", "media/android/stream_texture_wrapper_impl.cc", "media/android/stream_texture_wrapper_impl.h", "media/audio/audio_device_factory.cc", "media/audio/audio_device_factory.h", "media/audio/audio_input_ipc_factory.cc", "media/audio/audio_input_ipc_factory.h", "media/audio/audio_output_ipc_factory.cc", "media/audio/audio_output_ipc_factory.h", "media/audio/audio_renderer_mixer_manager.cc", "media/audio/audio_renderer_mixer_manager.h", "media/audio/audio_renderer_sink_cache.h", "media/audio/audio_renderer_sink_cache_impl.cc", "media/audio/audio_renderer_sink_cache_impl.h", "media/audio/mojo_audio_input_ipc.cc", "media/audio/mojo_audio_input_ipc.h", "media/audio/mojo_audio_output_ipc.cc", "media/audio/mojo_audio_output_ipc.h", "media/audio_decoder.cc", "media/audio_decoder.h", "media/batching_media_log.cc", "media/batching_media_log.h", "media/gpu/gpu_video_accelerator_factories_impl.cc", "media/gpu/gpu_video_accelerator_factories_impl.h", "media/inspector_media_event_handler.cc", "media/inspector_media_event_handler.h", "media/media_factory.cc", "media/media_factory.h", "media/media_interface_factory.cc", "media/media_interface_factory.h", "media/media_permission_dispatcher.cc", "media/media_permission_dispatcher.h", "media/power_status_helper_impl.cc", "media/power_status_helper_impl.h", "media/render_media_client.cc", "media/render_media_client.h", "media/render_media_event_handler.cc", "media/render_media_event_handler.h", "media/renderer_webaudiodevice_impl.cc", "media/renderer_webaudiodevice_impl.h", "media/renderer_webmediaplayer_delegate.cc", "media/renderer_webmediaplayer_delegate.h", "menu_item_builder.cc", "menu_item_builder.h", "mhtml_handle_writer.cc", "mhtml_handle_writer.h", "mojo/blink_interface_registry_impl.cc", "mojo/blink_interface_registry_impl.h", "mouse_lock_dispatcher.cc", "mouse_lock_dispatcher.h", "navigation_client.cc", "navigation_client.h", "navigation_state.cc", "navigation_state.h", "net_info_helper.cc", "net_info_helper.h", "performance_manager/v8_per_frame_memory_reporter_impl.cc", "performance_manager/v8_per_frame_memory_reporter_impl.h", "peripheral_content_heuristic.cc", "peripheral_content_heuristic.h", "queue_message_swap_promise.cc", "queue_message_swap_promise.h", "render_frame_impl.cc", "render_frame_impl.h", "render_frame_metadata_observer_impl.cc", "render_frame_metadata_observer_impl.h", "render_frame_proxy.cc", "render_frame_proxy.h", "render_process.cc", "render_process.h", "render_process_impl.cc", "render_process_impl.h", "render_thread_impl.cc", "render_thread_impl.h", "render_view_impl.cc", "render_view_impl.h", "render_view_linux.cc", "render_view_win.cc", "render_widget.cc", "render_widget.h", "render_widget_delegate.h", "render_widget_mouse_lock_dispatcher.cc", "render_widget_mouse_lock_dispatcher.h", "render_widget_screen_metrics_emulator.cc", "render_widget_screen_metrics_emulator.h", "render_widget_screen_metrics_emulator_delegate.h", "renderer_blink_platform_impl.cc", "renderer_blink_platform_impl.h", "renderer_main.cc", "renderer_main_platform_delegate.h", "renderer_main_platform_delegate_android.cc", "renderer_main_platform_delegate_linux.cc", "renderer_main_platform_delegate_mac.mm", "renderer_main_platform_delegate_win.cc", "sad_plugin.cc", "sad_plugin.h", "seccomp_sandbox_status_android.cc", "seccomp_sandbox_status_android.h", "service_worker/controller_service_worker_connector.cc", "service_worker/controller_service_worker_connector.h", "service_worker/embedded_worker_instance_client_impl.cc", "service_worker/embedded_worker_instance_client_impl.h", "service_worker/navigation_preload_request.cc", "service_worker/navigation_preload_request.h", "service_worker/service_worker_context_client.cc", "service_worker/service_worker_context_client.h", "service_worker/service_worker_fetch_context_impl.cc", "service_worker/service_worker_fetch_context_impl.h", "service_worker/service_worker_network_provider_for_frame.cc", "service_worker/service_worker_network_provider_for_frame.h", "service_worker/service_worker_provider_context.cc", "service_worker/service_worker_provider_context.h", "service_worker/service_worker_subresource_loader.cc", "service_worker/service_worker_subresource_loader.h", "service_worker/service_worker_type_converters.cc", "service_worker/service_worker_type_converters.h", "service_worker/web_service_worker_provider_impl.cc", "service_worker/web_service_worker_provider_impl.h", "skia_benchmarking_extension.cc", "skia_benchmarking_extension.h", "stats_collection_controller.cc", "stats_collection_controller.h", "storage_util.cc", "storage_util.h", "stream_texture_host_android.cc", "stream_texture_host_android.h", "theme_helper_mac.h", "theme_helper_mac.mm", "top_level_blame_context.cc", "top_level_blame_context.h", "v8_value_converter_impl.cc", "v8_value_converter_impl.h", "variations_render_thread_observer.cc", "variations_render_thread_observer.h", "web_ui_extension.cc", "web_ui_extension.h", "web_ui_extension_data.cc", "web_ui_extension_data.h", "webgraphicscontext3d_provider_impl.cc", "webgraphicscontext3d_provider_impl.h", "worker/dedicated_worker_host_factory_client.cc", "worker/dedicated_worker_host_factory_client.h", "worker/embedded_shared_worker_stub.cc", "worker/embedded_shared_worker_stub.h", "worker/fetch_client_settings_object_helpers.cc", "worker/fetch_client_settings_object_helpers.h", "worker/shared_worker_factory_impl.cc", "worker/shared_worker_factory_impl.h", "worker/worker_thread_registry.cc", "worker/worker_thread_registry.h", ] if (enable_cast_renderer) { sources += [ "media/cast_renderer_client_factory.cc", "media/cast_renderer_client_factory.h", ] } configs += [ "//content:content_implementation", "//build/config/compiler:no_size_t_to_int_warning", ] defines = [] public_deps = [ "//content/common:mojo_bindings", "//content/public/common:common_sources", "//ipc", ] deps = [ "//base", "//base:i18n", "//build:chromecast_buildflags", "//cc", "//cc/animation", "//cc/mojo_embedder", "//cc/paint", "//components/discardable_memory/client", "//components/metrics", "//components/metrics:single_sample_metrics", "//components/url_formatter", "//components/variations/net", "//components/viz/client", "//components/viz/common", "//content:content_resources", "//content:dev_ui_content_resources", "//content/child", "//content/common", "//content/common:buildflags", "//content/gpu:gpu_sources", "//content/public/child:child_sources", "//content/public/common:service_names", "//crypto", "//crypto:platform", "//device/base/synchronization", "//device/gamepad/public/cpp:shared_with_blink", "//device/gamepad/public/mojom", "//gin", "//gpu", "//gpu/command_buffer/client:gles2_interface", "//gpu/command_buffer/client:raster_interface", "//gpu/command_buffer/client:webgpu_interface", "//media", "//media:media_buildflags", "//media/blink", "//media/capture", "//media/gpu", "//media/gpu/ipc/client", "//media/gpu/ipc/common", "//media/midi", "//media/midi:mojo", "//media/mojo:buildflags", "//media/mojo/clients", "//media/mojo/mojom", "//media/webrtc", "//mojo/public/cpp/bindings", "//net", "//ppapi/buildflags", "//printing/buildflags", "//sandbox", "//services/audio/public/mojom", "//services/device/public/cpp/generic_sensor", "//services/device/public/mojom", "//services/device/public/mojom:usb", "//services/image_annotation/public/cpp:cpp", "//services/image_annotation/public/mojom:mojom", "//services/metrics/public/cpp:metrics_cpp", "//services/metrics/public/cpp:ukm_builders", "//services/network:network_service", "//services/service_manager/public/cpp", "//services/service_manager/public/mojom", "//services/tracing/public/cpp", "//services/viz/public/cpp/gpu", "//skia", "//storage/common", "//third_party/blink/public:blink", "//third_party/blink/public:buildflags", "//third_party/blink/public/common", "//third_party/blink/public/strings:strings_grit", "//third_party/boringssl", "//third_party/icu", "//third_party/libyuv", "//third_party/sqlite", "//third_party/widevine/cdm:headers", "//ui/accessibility", "//ui/base", "//ui/base/clipboard", "//ui/base/cursor:cursor_base", "//ui/base/ime", "//ui/display", "//ui/events:dom_keycode_converter", "//ui/events:events_base", "//ui/events/blink", "//ui/gfx/geometry/mojom", "//ui/gl", "//ui/latency", "//ui/native_theme", "//ui/surface", "//v8", ] allow_circular_includes_from = [] if (is_android) { set_sources_assignment_filter([]) sources += [ "input/synchronous_compositor_proxy.cc", "input/synchronous_compositor_proxy.h", "input/synchronous_compositor_registry.h", "input/synchronous_layer_tree_frame_sink.h", # Add back the Linux file which Android shares. "render_view_linux.cc", ] set_sources_assignment_filter(sources_assignment_filter) deps += [ # Used by Android WebView only. "//components/viz/service", "//third_party/android_ndk:cpu_features", "//third_party/ashmem", "//third_party/libphonenumber", ] } else { sources -= [ "java/gin_java_bridge_dispatcher.cc", "java/gin_java_bridge_dispatcher.h", "java/gin_java_bridge_object.cc", "java/gin_java_bridge_object.h", "java/gin_java_bridge_value_converter.cc", "java/gin_java_bridge_value_converter.h", "java/gin_java_function_invocation_helper.cc", "java/gin_java_function_invocation_helper.h", ] } if (is_linux) { deps += [ "//components/services/font/public/cpp" ] } if (is_mac) { sources += [ "text_input_client_observer.cc", "text_input_client_observer.h", ] } if (is_fuchsia) { sources += [ "media/audio/fuchsia_audio_device_factory.cc", "media/audio/fuchsia_audio_device_factory.h", "media/fuchsia_renderer_factory.cc", "media/fuchsia_renderer_factory.h", "render_view_fuchsia.cc", "renderer_main_platform_delegate_fuchsia.cc", ] deps += [ "//media/fuchsia/audio", "//media/fuchsia/cdm/client", "//media/fuchsia/mojom", ] } if (enable_media_remoting || is_chromecast) { deps += [ "//media/mojo/mojom:remoting" ] if (enable_media_remoting) { deps += [ "//media/remoting:remoting_sender" ] } if (is_chromecast) { deps += [ "//media/remoting:remoting_constants", "//media/remoting:remoting_renderer", ] } } if (enable_plugins) { sources += [ "pepper/pepper_media_stream_audio_track_host.cc", "pepper/pepper_media_stream_audio_track_host.h", "pepper/pepper_media_stream_track_host_base.cc", "pepper/pepper_media_stream_track_host_base.h", "pepper/pepper_media_stream_video_track_host.cc", "pepper/pepper_media_stream_video_track_host.h", ] } if (enable_plugins) { sources += [ "pepper/audio_helper.cc", "pepper/audio_helper.h", "pepper/content_renderer_pepper_host_factory.cc", "pepper/content_renderer_pepper_host_factory.h", "pepper/event_conversion.cc", "pepper/event_conversion.h", "pepper/fullscreen_container.h", "pepper/gfx_conversion.h", "pepper/host_array_buffer_var.cc", "pepper/host_array_buffer_var.h", "pepper/host_dispatcher_wrapper.cc", "pepper/host_dispatcher_wrapper.h", "pepper/host_globals.cc", "pepper/host_globals.h", "pepper/host_resource_var.cc", "pepper/host_resource_var.h", "pepper/host_var_tracker.cc", "pepper/host_var_tracker.h", "pepper/message_channel.cc", "pepper/message_channel.h", "pepper/pepper_audio_controller.cc", "pepper/pepper_audio_controller.h", "pepper/pepper_audio_encoder_host.cc", "pepper/pepper_audio_encoder_host.h", "pepper/pepper_audio_input_host.cc", "pepper/pepper_audio_input_host.h", "pepper/pepper_audio_output_host.cc", "pepper/pepper_audio_output_host.h", "pepper/pepper_broker.cc", "pepper/pepper_broker.h", "pepper/pepper_browser_connection.cc", "pepper/pepper_browser_connection.h", "pepper/pepper_camera_device_host.cc", "pepper/pepper_camera_device_host.h", "pepper/pepper_device_enumeration_host_helper.cc", "pepper/pepper_device_enumeration_host_helper.h", "pepper/pepper_file_chooser_host.cc", "pepper/pepper_file_chooser_host.h", "pepper/pepper_file_ref_renderer_host.cc", "pepper/pepper_file_ref_renderer_host.h", "pepper/pepper_file_system_host.cc", "pepper/pepper_file_system_host.h", "pepper/pepper_graphics_2d_host.cc", "pepper/pepper_graphics_2d_host.h", "pepper/pepper_hung_plugin_filter.cc", "pepper/pepper_hung_plugin_filter.h", "pepper/pepper_in_process_resource_creation.cc", "pepper/pepper_in_process_resource_creation.h", "pepper/pepper_in_process_router.cc", "pepper/pepper_in_process_router.h", "pepper/pepper_media_device_manager.cc", "pepper/pepper_media_device_manager.h", "pepper/pepper_platform_audio_input.cc", "pepper/pepper_platform_audio_input.h", "pepper/pepper_platform_audio_output.cc", "pepper/pepper_platform_audio_output.h", "pepper/pepper_platform_audio_output_dev.cc", "pepper/pepper_platform_audio_output_dev.h", "pepper/pepper_platform_camera_device.cc", "pepper/pepper_platform_camera_device.h", "pepper/pepper_platform_video_capture.cc", "pepper/pepper_platform_video_capture.h", "pepper/pepper_plugin_instance_impl.cc", "pepper/pepper_plugin_instance_impl.h", "pepper/pepper_plugin_registry.cc", "pepper/pepper_plugin_registry.h", "pepper/pepper_proxy_channel_delegate_impl.cc", "pepper/pepper_proxy_channel_delegate_impl.h", "pepper/pepper_try_catch.cc", "pepper/pepper_try_catch.h", "pepper/pepper_url_loader_host.cc", "pepper/pepper_url_loader_host.h", "pepper/pepper_video_capture_host.cc", "pepper/pepper_video_capture_host.h", "pepper/pepper_video_decoder_host.cc", "pepper/pepper_video_decoder_host.h", "pepper/pepper_video_encoder_host.cc", "pepper/pepper_video_encoder_host.h", "pepper/pepper_webplugin_impl.cc", "pepper/pepper_webplugin_impl.h", "pepper/pepper_websocket_host.cc", "pepper/pepper_websocket_host.h", "pepper/plugin_instance_throttler_impl.cc", "pepper/plugin_instance_throttler_impl.h", "pepper/plugin_module.cc", "pepper/plugin_module.h", "pepper/plugin_object.cc", "pepper/plugin_object.h", "pepper/plugin_power_saver_helper.cc", "pepper/plugin_power_saver_helper.h", "pepper/ppapi_preferences_builder.cc", "pepper/ppapi_preferences_builder.h", "pepper/ppb_audio_impl.cc", "pepper/ppb_audio_impl.h", "pepper/ppb_broker_impl.cc", "pepper/ppb_broker_impl.h", "pepper/ppb_buffer_impl.cc", "pepper/ppb_buffer_impl.h", "pepper/ppb_flash_message_loop_impl.cc", "pepper/ppb_flash_message_loop_impl.h", "pepper/ppb_graphics_3d_impl.cc", "pepper/ppb_graphics_3d_impl.h", "pepper/ppb_image_data_impl.cc", "pepper/ppb_image_data_impl.h", "pepper/ppb_proxy_impl.cc", "pepper/ppb_proxy_impl.h", "pepper/ppb_var_deprecated_impl.cc", "pepper/ppb_var_deprecated_impl.h", "pepper/ppb_video_decoder_impl.cc", "pepper/ppb_video_decoder_impl.h", "pepper/renderer_ppapi_host_impl.cc", "pepper/renderer_ppapi_host_impl.h", "pepper/renderer_restrict_dispatch_group.h", "pepper/resource_converter.cc", "pepper/resource_converter.h", "pepper/resource_creation_impl.cc", "pepper/resource_creation_impl.h", "pepper/url_request_info_util.cc", "pepper/url_request_info_util.h", "pepper/url_response_info_util.cc", "pepper/url_response_info_util.h", "pepper/v8_var_converter.cc", "pepper/v8_var_converter.h", "pepper/v8object_var.cc", "pepper/v8object_var.h", "pepper/video_decoder_shim.cc", "pepper/video_decoder_shim.h", "pepper/video_encoder_shim.cc", "pepper/video_encoder_shim.h", "render_widget_fullscreen_pepper.cc", "render_widget_fullscreen_pepper.h", ] deps += [ "//components/nacl/common:buildflags", "//ppapi/host", "//ppapi/proxy", "//ppapi/shared_impl", "//printing/mojom", "//third_party/libvpx", "//third_party/opus", "//ui/base/cursor:cursor_base", "//ui/base/cursor/mojom:cursor_type", ] } if (enable_basic_printing) { deps += [ "//printing" ] } if (is_linux || is_android) { deps += [ "//sandbox:sandbox_buildflags" ] } if (is_chromeos) { deps += [ "//chromeos:chromeos_export", "//chromeos/system:system", ] } if (use_ozone) { deps += [ "//ui/ozone" ] } if (enable_ipc_fuzzer) { configs += [ "//tools/ipc_fuzzer:ipc_fuzzer_config" ] } } # See comment at the top of //content/BUILD.gn for how this works. group("for_content_tests") { visibility = [ "//content/shell:web_test_renderer", "//content/test/*", ] if (!is_component_build) { public_deps = [ ":renderer" ] } } fuzzer_test("audio_decoder_fuzzer") { sources = [ "media/audio_decoder_fuzzer.cpp" ] deps = [ "//content/public/renderer:renderer_sources", "//content/renderer:renderer", "//content/test:test_support", ] seed_corpus = "//media/test/data" }