blob: 4bea50402f96c8308bda894b2ab7dcf953dfd6e5 [file] [log] [blame]
# 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/buildflags_paint_preview.gni")
import("//build/config/chromeos/ui_mode.gni")
import("//build/config/features.gni")
import("//chrome/common/features.gni")
import("//components/nacl/features.gni")
import("//components/offline_pages/buildflags/features.gni")
import("//components/spellcheck/spellcheck_build_features.gni")
import("//extensions/buildflags/buildflags.gni")
import("//media/media_options.gni")
import("//pdf/features.gni")
import("//ppapi/buildflags/buildflags.gni")
import("//testing/libfuzzer/fuzzer_test.gni")
import("//third_party/widevine/cdm/widevine.gni")
import("//tools/grit/grit_rule.gni")
grit("resources") {
source = "resources/renderer_resources.grd"
defines = chrome_grit_defines
output_dir = "$root_gen_dir/chrome"
output_name = "renderer_resources"
outputs = [
"grit/renderer_resources.h",
"renderer_resources_100_percent.pak",
"renderer_resources_200_percent.pak",
"renderer_resources_300_percent.pak",
]
grit_flags = [
"-E",
"mojom_root=" + rebase_path(root_gen_dir, root_build_dir),
]
deps = [
"//components/media_router/common/mojom:media_controller_js",
"//components/media_router/common/mojom:media_router_js",
"//services/network/public/mojom:mojom_js",
"//url/mojom:url_mojom_gurl_js",
"//url/mojom:url_mojom_origin_js",
]
if (is_chromeos_ash) {
deps += [
"//ash/components/enhanced_network_tts/mojom:mojom_js",
"//chromeos/components/remote_apps/mojom:mojom_js",
"//chromeos/services/ime/public/mojom:mojom_js",
"//chromeos/services/tts/public/mojom:mojom_js",
]
}
}
static_library("renderer") {
sources = [
"benchmarking_extension.cc",
"benchmarking_extension.h",
"browser_exposed_renderer_interfaces.cc",
"browser_exposed_renderer_interfaces.h",
"chrome_content_renderer_client.cc",
"chrome_content_renderer_client.h",
"chrome_content_settings_agent_delegate.cc",
"chrome_content_settings_agent_delegate.h",
"chrome_render_frame_observer.cc",
"chrome_render_frame_observer.h",
"chrome_render_thread_observer.cc",
"chrome_render_thread_observer.h",
"custom_menu_commands.h",
"instant_restricted_id_cache.h",
"lite_video/lite_video_hint_agent.cc",
"lite_video/lite_video_hint_agent.h",
"lite_video/lite_video_url_loader_throttle.cc",
"lite_video/lite_video_url_loader_throttle.h",
"lite_video/lite_video_util.cc",
"lite_video/lite_video_util.h",
"loadtimes_extension_bindings.cc",
"loadtimes_extension_bindings.h",
"media/chrome_key_systems.cc",
"media/chrome_key_systems.h",
"media/chrome_key_systems_provider.cc",
"media/chrome_key_systems_provider.h",
"media/flash_embed_rewrite.cc",
"media/flash_embed_rewrite.h",
"media/media_feeds.cc",
"media/media_feeds.h",
"media/webrtc_logging_agent_impl.cc",
"media/webrtc_logging_agent_impl.h",
"net/net_error_helper.cc",
"net/net_error_helper.h",
"net/net_error_helper_core.cc",
"net/net_error_helper_core.h",
"net/net_error_page_controller.cc",
"net/net_error_page_controller.h",
"net_benchmarking_extension.cc",
"net_benchmarking_extension.h",
"plugins/non_loadable_plugin_placeholder.cc",
"plugins/non_loadable_plugin_placeholder.h",
"plugins/pdf_plugin_placeholder.cc",
"plugins/pdf_plugin_placeholder.h",
"plugins/plugin_uma.cc",
"plugins/plugin_uma.h",
"previews/resource_loading_hints_agent.cc",
"previews/resource_loading_hints_agent.h",
"subresource_redirect/login_robots_compression_metrics.cc",
"subresource_redirect/login_robots_compression_metrics.h",
"subresource_redirect/login_robots_decider_agent.cc",
"subresource_redirect/login_robots_decider_agent.h",
"subresource_redirect/public_image_hints_decider_agent.cc",
"subresource_redirect/public_image_hints_decider_agent.h",
"subresource_redirect/public_resource_decider.h",
"subresource_redirect/public_resource_decider_agent.cc",
"subresource_redirect/public_resource_decider_agent.h",
"subresource_redirect/robots_rules_parser.cc",
"subresource_redirect/robots_rules_parser.h",
"subresource_redirect/robots_rules_parser_cache.cc",
"subresource_redirect/robots_rules_parser_cache.h",
"subresource_redirect/src_video_redirect_url_loader_throttle.cc",
"subresource_redirect/src_video_redirect_url_loader_throttle.h",
"subresource_redirect/subresource_redirect_params.cc",
"subresource_redirect/subresource_redirect_params.h",
"subresource_redirect/subresource_redirect_url_loader_throttle.cc",
"subresource_redirect/subresource_redirect_url_loader_throttle.h",
"subresource_redirect/subresource_redirect_util.cc",
"subresource_redirect/subresource_redirect_util.h",
"sync_encryption_keys_extension.cc",
"sync_encryption_keys_extension.h",
"url_loader_throttle_provider_impl.cc",
"url_loader_throttle_provider_impl.h",
"v8_unwinder.cc",
"v8_unwinder.h",
"websocket_handshake_throttle_provider_impl.cc",
"websocket_handshake_throttle_provider_impl.h",
"worker_content_settings_client.cc",
"worker_content_settings_client.h",
]
if (enable_supervised_users) {
sources += [
"supervised_user/supervised_user_error_page_controller.cc",
"supervised_user/supervised_user_error_page_controller.h",
"supervised_user/supervised_user_error_page_controller_delegate.h",
"supervised_user/supervised_user_error_page_controller_delegate_impl.cc",
"supervised_user/supervised_user_error_page_controller_delegate_impl.h",
]
}
defines = []
public_deps = [ "//components/contextual_search:buildflags" ]
deps = [
"//base/allocator:buildflags",
"//build:chromeos_buildflags",
"//chrome:resources",
"//chrome:strings",
"//chrome/common",
"//chrome/common:mojo_bindings",
"//chrome/common/net",
"//chrome/common/performance_manager/mojom",
"//chrome/common/search:mojo_bindings",
"//components/autofill/content/renderer",
"//components/base32",
"//components/cdm/renderer",
"//components/content_capture/common",
"//components/content_capture/renderer",
"//components/content_settings/common:mojom",
"//components/content_settings/renderer",
"//components/contextual_search/content:renderer",
"//components/continuous_search/renderer",
"//components/data_reduction_proxy/core/common",
"//components/dom_distiller/content/renderer",
"//components/feed:buildflags",
"//components/feed:feature_list",
"//components/feed/content/renderer:feed_renderer",
"//components/history_clusters/core",
"//components/network_hints/renderer",
"//components/no_state_prefetch/common",
"//components/no_state_prefetch/renderer",
"//components/omnibox/common",
"//components/optimization_guide/content/renderer",
"//components/page_image_annotation/content/renderer",
"//components/page_load_metrics/renderer",
"//components/paint_preview/buildflags",
"//components/plugins/renderer",
"//components/resources:components_resources",
"//components/resources:components_scaled_resources",
"//components/safe_browsing:buildflags",
"//components/safe_browsing/content/common:interfaces",
"//components/safe_browsing/content/renderer",
"//components/safe_browsing/content/renderer:throttles",
"//components/safe_browsing/core/common",
"//components/safe_browsing/core/common:interfaces",
"//components/security_interstitials/content/renderer:security_interstitial_page_controller",
"//components/security_interstitials/core:",
"//components/security_interstitials/core/common/mojom:",
"//components/spellcheck:buildflags",
"//components/subresource_filter/content/renderer",
"//components/subresource_filter/core/common",
"//components/subresource_redirect/common",
"//components/subresource_redirect/proto",
"//components/sync/driver",
"//components/translate/content/renderer",
"//components/translate/core/common",
"//components/translate/core/language_detection",
"//components/visitedlink/renderer",
"//components/web_cache/public:features",
"//components/web_cache/renderer",
"//components/webapps/renderer",
"//content/app/resources",
"//content/public/child",
"//content/public/common",
"//content/public/renderer",
"//extensions/buildflags",
"//gin",
"//media",
"//media:media_buildflags",
"//media/capture",
"//media/mojo/common",
"//mojo/public/cpp/bindings",
"//net",
"//pdf:buildflags",
"//pdf:pdf_view_web_plugin",
"//ppapi/buildflags",
"//printing/buildflags",
"//services/metrics/public/cpp:metrics_cpp",
"//services/metrics/public/cpp:ukm_builders",
"//services/metrics/public/mojom",
"//services/service_manager/public/cpp",
"//skia",
"//storage/common",
"//third_party/blink/public:blink",
"//third_party/blink/public:resources",
"//third_party/blink/public:scaled_resources",
"//third_party/blink/public/strings",
"//third_party/icu",
"//third_party/re2",
"//third_party/widevine/cdm:buildflags",
"//ui/surface",
"//v8",
]
data_deps = [ "//tools/v8_context_snapshot" ]
configs += [ "//build/config/compiler:wexit_time_destructors" ]
if (enable_nacl) {
deps += [
"//components/nacl/loader",
"//components/nacl/renderer",
]
}
if (enable_plugins) {
sources += [
"pepper/chrome_renderer_pepper_host_factory.cc",
"pepper/chrome_renderer_pepper_host_factory.h",
"pepper/pepper_flash_font_file_host.cc",
"pepper/pepper_flash_font_file_host.h",
"pepper/pepper_flash_fullscreen_host.cc",
"pepper/pepper_flash_fullscreen_host.h",
"pepper/pepper_helper.cc",
"pepper/pepper_helper.h",
"pepper/pepper_shared_memory_message_filter.cc",
"pepper/pepper_shared_memory_message_filter.h",
"pepper/pepper_uma_host.cc",
"pepper/pepper_uma_host.h",
"plugins/chrome_plugin_placeholder.cc",
"plugins/chrome_plugin_placeholder.h",
]
deps += [
"//components/strings",
"//media:media_buildflags",
"//ppapi/host",
"//ppapi/proxy",
"//ppapi/proxy:ipc",
"//ppapi/shared_impl",
]
if (is_linux || is_chromeos) {
deps += [ "//components/services/font/public/cpp" ]
}
}
if (enable_pdf) {
sources += [
"pdf/chrome_pdf_internal_plugin_delegate.cc",
"pdf/chrome_pdf_internal_plugin_delegate.h",
]
deps += [
"//components/pdf/common",
"//components/pdf/renderer",
]
if (is_linux || is_chromeos) {
deps += [ "//pdf:font_table_linux" ]
}
}
if (is_chromeos_ash) {
deps += [ "//ash/constants" ]
}
if (enable_widevine_cdm_component) {
deps += [ "//third_party/widevine/cdm:headers" ]
}
if (safe_browsing_mode != 0) {
deps +=
[ "//components/safe_browsing/content/renderer/phishing_classifier" ]
}
if (enable_feed_v2) {
deps += [ "//components/feed/content/renderer:feed_renderer" ]
}
if (enable_extensions) {
sources += [
"extensions/accessibility_private_hooks_delegate.cc",
"extensions/accessibility_private_hooks_delegate.h",
"extensions/app_hooks_delegate.cc",
"extensions/app_hooks_delegate.h",
"extensions/chrome_extensions_dispatcher_delegate.cc",
"extensions/chrome_extensions_dispatcher_delegate.h",
"extensions/chrome_extensions_renderer_client.cc",
"extensions/chrome_extensions_renderer_client.h",
"extensions/extension_hooks_delegate.cc",
"extensions/extension_hooks_delegate.h",
"extensions/extension_localization_peer.cc",
"extensions/extension_localization_peer.h",
"extensions/extension_process_policy.cc",
"extensions/extension_process_policy.h",
"extensions/media_galleries_custom_bindings.cc",
"extensions/media_galleries_custom_bindings.h",
"extensions/notifications_native_handler.cc",
"extensions/notifications_native_handler.h",
"extensions/page_capture_custom_bindings.cc",
"extensions/page_capture_custom_bindings.h",
"extensions/renderer_permissions_policy_delegate.cc",
"extensions/renderer_permissions_policy_delegate.h",
"extensions/resource_request_policy.cc",
"extensions/resource_request_policy.h",
"extensions/sync_file_system_custom_bindings.cc",
"extensions/sync_file_system_custom_bindings.h",
"extensions/tabs_hooks_delegate.cc",
"extensions/tabs_hooks_delegate.h",
]
deps += [
"//chrome/common/extensions/api",
"//components/guest_view/renderer",
"//extensions:extensions_resources",
"//extensions/common:mojom",
"//extensions/renderer",
"//services/network/public/cpp",
]
public_deps += [ "//ipc" ]
}
if (enable_spellcheck) {
deps += [ "//components/spellcheck/renderer:renderer" ]
}
if (enable_basic_printing) {
deps += [
"//components/printing/renderer",
"//printing",
]
sources += [
"printing/chrome_print_render_frame_helper_delegate.cc",
"printing/chrome_print_render_frame_helper_delegate.h",
]
if (enable_print_preview) {
sources += [
"pepper/chrome_pdf_print_client.cc",
"pepper/chrome_pdf_print_client.h",
]
}
}
if (enable_paint_preview) {
deps += [ "//components/paint_preview/renderer" ]
}
if (is_win) {
deps += [ "//third_party/wtl" ]
}
if (is_chromeos_ash || is_chromeos_lacros) {
sources += [
"extensions/platform_keys_natives.cc",
"extensions/platform_keys_natives.h",
]
}
if (is_chromeos_ash) {
sources += [
"extensions/file_browser_handler_custom_bindings.cc",
"extensions/file_browser_handler_custom_bindings.h",
"extensions/file_manager_private_custom_bindings.cc",
"extensions/file_manager_private_custom_bindings.h",
]
if (use_cups) {
configs += [ "//printing:cups" ]
sources += [
"extensions/printing_hooks_delegate.cc",
"extensions/printing_hooks_delegate.h",
]
}
}
if (!is_android) {
sources += [
"cart/commerce_hint_agent.cc",
"cart/commerce_hint_agent.h",
"media/chrome_speech_recognition_client.cc",
"media/chrome_speech_recognition_client.h",
"searchbox/searchbox.cc",
"searchbox/searchbox.h",
"searchbox/searchbox_extension.cc",
"searchbox/searchbox_extension.h",
]
deps += [
"//chrome/common/cart:mojo_bindings",
"//chrome/common/search:generate_chrome_colors_info",
"//chrome/common/search:generate_colors_info",
"//components/crx_file",
"//components/search:search",
]
}
if (is_android) {
sources += [
"net/available_offline_content_helper.cc",
"net/available_offline_content_helper.h",
"net/page_auto_fetcher_helper_android.cc",
"net/page_auto_fetcher_helper_android.h",
"sandbox_status_extension_android.cc",
"sandbox_status_extension_android.h",
]
}
if (is_chromeos_ash) {
sources += [
"chromeos_delayed_callback_group.cc",
"chromeos_delayed_callback_group.h",
"chromeos_merge_session_loader_throttle.cc",
"chromeos_merge_session_loader_throttle.h",
]
}
if (is_chromeos_ash) {
sources += [
"performance_manager/mechanisms/tcmalloc_tunables_impl.cc",
"performance_manager/mechanisms/tcmalloc_tunables_impl.h",
"performance_manager/mechanisms/userspace_swap_impl_chromeos.cc",
"performance_manager/mechanisms/userspace_swap_impl_chromeos.h",
]
deps += [
"//chrome/common/performance_manager/mojom",
"//chromeos/memory/userspace_swap",
"//chromeos/memory/userspace_swap:mojom",
]
}
}
fuzzer_test("robots_rules_parser_fuzzer") {
sources = [
"subresource_redirect/robots_rules_parser.cc",
"subresource_redirect/robots_rules_parser.h",
"subresource_redirect/robots_rules_parser_fuzzer.cc",
"subresource_redirect/subresource_redirect_params.cc",
"subresource_redirect/subresource_redirect_params.h",
]
deps = [
"//base",
"//base/test:test_support",
"//chrome/common:constants",
"//components/subresource_redirect/proto",
"//third_party/blink/public/common",
"//third_party/icu/fuzzers:fuzzer_support",
]
}