blob: 1dce3b7e260fbc44f966491e5fef952b28373b0d [file] [log] [blame]
# Copyright 2018 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/buildflag_header.gni")
import("//build/config/compiler/compiler.gni")
import("//build/config/features.gni")
import("//testing/test.gni")
import("//third_party/protobuf/proto_library.gni")
import("//third_party/webrtc/webrtc.gni")
if (is_android) {
import("//build/config/android/rules.gni")
}
# Public common API headers, mojom and libraries that can be linked and
# referenced both by browser-side and renderer-side components.
component("common") {
output_name = "blink_common"
public_deps = [
"//third_party/blink/common/privacy_budget:privacy_budget",
"//third_party/blink/public/common:headers",
"//third_party/blink/public/mojom:mojom_modules",
"//third_party/blink/public/mojom:web_bluetooth_mojo_bindings",
]
deps = [
"//cc/ipc",
"//third_party/blink/common",
"//ui/events/ipc",
]
}
buildflag_header("buildflags") {
header = "buildflags.h"
flags = [ "RTC_USE_H264=$rtc_use_h264" ]
}
source_set("common_export") {
visibility = [
"//third_party/blink/common/*",
"//third_party/blink/public/common/*",
]
sources = [ "common_export.h" ]
}
source_set("headers") {
visibility = [
":*",
"//chrome/*",
"//chromecast/*",
"//components/*",
"//content/*",
"//fuchsia/*",
"//services/*",
"//storage/*",
"//third_party/blink/*",
]
sources = [
"action_after_pagehide.h",
"associated_interfaces/associated_interface_provider.h",
"associated_interfaces/associated_interface_registry.h",
"blob/blob_utils.h",
"bluetooth/web_bluetooth_device_id.h",
"bluetooth/web_bluetooth_device_id_mojom_traits.h",
"browser_interface_broker_proxy.h",
"cache_storage/cache_storage_utils.h",
"client_hints/client_hints.h",
"context_menu_data/context_menu_data.h",
"context_menu_data/context_menu_params_builder.h",
"context_menu_data/edit_flags.h",
"context_menu_data/menu_item_info.h",
"context_menu_data/untrustworthy_context_menu_params.h",
"css/forced_colors.h",
"css/navigation_controls.h",
"css/page_orientation.h",
"css/page_size_type.h",
"custom_handlers/protocol_handler_utils.h",
"device_memory/approximated_device_memory.h",
"dom_storage/session_storage_namespace_id.h",
"experiments/memory_ablation_experiment.h",
"feature_policy/document_policy.h",
"feature_policy/document_policy_features.h",
"feature_policy/feature_policy.h",
"feature_policy/feature_policy_features.h",
"feature_policy/feature_policy_forward.h",
"feature_policy/policy_value.h",
"features.h",
"fetch/fetch_api_request_headers_map.h",
"fetch/fetch_api_request_headers_mojom_traits.h",
"forcedark/forcedark_switches.h",
"frame/frame_policy.h",
"frame/frame_visual_properties.h",
"frame/from_ad_state.h",
"frame/payment_request_token.h",
"frame/transient_allow_fullscreen.h",
"frame/user_activation_state.h",
"frame/user_activation_update_source.h",
"indexeddb/indexed_db_default_mojom_traits.h",
"indexeddb/indexeddb_key.h",
"indexeddb/indexeddb_key_path.h",
"indexeddb/indexeddb_key_range.h",
"indexeddb/indexeddb_metadata.h",
"indexeddb/web_idb_types.h",
"input/pointer_id.h",
"input/synthetic_web_input_event_builders.h",
"input/web_coalesced_input_event.h",
"input/web_coalesced_input_event_mojom_traits.h",
"input/web_gesture_device.h",
"input/web_gesture_event.h",
"input/web_input_event.h",
"input/web_input_event_attribution.h",
"input/web_keyboard_event.h",
"input/web_menu_source_type.h",
"input/web_mouse_event.h",
"input/web_mouse_wheel_event.h",
"input/web_pointer_event.h",
"input/web_pointer_properties.h",
"input/web_touch_event.h",
"input/web_touch_point.h",
"loader/http_body_element_type.h",
"loader/inter_process_time_ticks_converter.h",
"loader/loading_behavior_flag.h",
"loader/mime_sniffing_throttle.h",
"loader/mime_sniffing_url_loader.h",
"loader/network_utils.h",
"loader/previews_state.h",
"loader/record_load_histograms.h",
"loader/referrer_utils.h",
"loader/resource_type_util.h",
"loader/url_loader_factory_bundle.h",
"loader/url_loader_factory_bundle_mojom_traits.h",
"loader/url_loader_throttle.h",
"loader/worker_main_script_load_parameters.h",
"logging/logging_utils.h",
"manifest/manifest.h",
"manifest/manifest_icon_selector.h",
"manifest/manifest_util.h",
"media/display_type.h",
"media/video_capture.h",
"media/watch_time_component.h",
"media/watch_time_reporter.h",
"mediastream/media_devices.h",
"mediastream/media_devices_mojom_traits.h",
"mediastream/media_stream_controls.h",
"mediastream/media_stream_mojom_traits.h",
"mediastream/media_stream_request.h",
"messaging/cloneable_message.h",
"messaging/cloneable_message_mojom_traits.h",
"messaging/message_port_channel.h",
"messaging/message_port_descriptor.h",
"messaging/message_port_descriptor_mojom_traits.h",
"messaging/string_message_codec.h",
"messaging/transferable_message.h",
"messaging/transferable_message_mojom_traits.h",
"messaging/web_message_port.h",
"metrics/document_update_reason.h",
"metrics/form_element_pii_type.h",
"mime_util/mime_util.h",
"mobile_metrics/mobile_friendliness.h",
"native_io/native_io_utils.h",
"navigation/impression.h",
"navigation/navigation_policy.h",
"navigation/resource_intercept_policy.h",
"net/ip_address_space_util.h",
"notifications/notification_constants.h",
"notifications/notification_mojom_traits.h",
"notifications/notification_resources.h",
"notifications/platform_notification_data.h",
"oom_intervention/oom_intervention_types.h",
"origin_trials/origin_trial_policy.h",
"origin_trials/trial_token.h",
"origin_trials/trial_token_validator.h",
"page/content_to_visible_time_reporter.h",
"page/drag_mojom_traits.h",
"page/drag_operation.h",
"page/launching_process_state.h",
"page/page_zoom.h",
"page_state/page_state.h",
"page_state/page_state_serialization.h",
"peerconnection/webrtc_ip_handling_policy.h",
"permissions/permission_utils.h",
"renderer_preferences/renderer_preferences.h",
"scheduler/web_scheduler_tracked_feature.h",
"security/protocol_handler_security_level.h",
"security/security_style.h",
"security_context/insecure_request_policy.h",
"service_worker/service_worker_scope_match.h",
"service_worker/service_worker_status_code.h",
"service_worker/service_worker_type_converters.h",
"service_worker/service_worker_types.h",
"sms/webotp_constants.h",
"sms/webotp_service_destroyed_reason.h",
"sms/webotp_service_outcome.h",
"switches.h",
"thread_safe_browser_interface_broker_proxy.h",
"unique_name/unique_name_helper.h",
"user_agent/user_agent_metadata.h",
"web_cache/web_cache_resource_type_stats.h",
"web_package/signed_exchange_consts.h",
"web_package/web_package_request_matcher.h",
"web_preferences/web_preferences.h",
"widget/device_emulation_params.h",
"widget/screen_info.h",
"widget/visual_properties.h",
]
public_deps = [
"//mojo/public/cpp/bindings",
"//services/metrics/public/cpp:metrics_cpp",
"//services/network/public/cpp:cpp",
"//skia",
"//skia/public/mojom:shared_typemap_traits",
"//third_party/blink/public/common/privacy_budget",
"//third_party/blink/public/common/tokens:tokens_headers",
"//third_party/blink/public/mojom:mojom_modules_headers",
"//third_party/blink/public/mojom:mojom_platform_shared",
"//third_party/blink/public/mojom:web_bluetooth_mojo_bindings_headers",
"//ui/events:event_constants",
"//ui/events/types:headers",
"//ui/latency",
]
deps = [
":buildflags",
":common_export",
"//base",
"//cc",
"//components/viz/common",
"//mojo/public/cpp/bindings",
"//mojo/public/cpp/system",
"//mojo/public/mojom/base",
"//net",
"//ui/base:base",
]
# iOS doesn't use and must not depend on //media
if (!is_ios) {
deps += [
"//media",
"//media/capture:capture_base",
"//media/capture:capture_lib",
]
public_deps += [ "//media/mojo/mojom" ]
}
if (is_android || is_win) {
sources += [
"font_unique_name_lookup/font_table_matcher.h",
"font_unique_name_lookup/font_table_persistence.h",
"font_unique_name_lookup/icu_fold_case_util.h",
]
deps += [ ":font_unique_name_table_proto" ]
}
if (is_mac) {
sources += [ "sandbox_support/sandbox_support_mac.h" ]
}
if (is_win) {
sources += [ "dwrite_rasterizer_support/dwrite_rasterizer_support.h" ]
}
}
if (is_android || is_win) {
proto_library("font_unique_name_table_proto") {
sources = [ "font_unique_name_lookup/font_unique_name_table.proto" ]
}
}
proto_library("font_enumeration_table_proto") {
sources = [ "font_access/font_enumeration_table.proto" ]
}
if (is_android) {
java_cpp_features("java_features_srcjar") {
# External code should depend on ":common_java" instead.
visibility = [ ":*" ]
sources = [ "//third_party/blink/common/features.cc" ]
template = "//third_party/blink/public/common/android/java_templates/BlinkFeatures.java.tmpl"
}
android_library("common_java") {
# Right now, this only includes the Java features. But if we need more Java
# files, they should be added here as necessary.
srcjar_deps = [ ":java_features_srcjar" ]
}
}