| # 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/buildflag_header.gni") |
| import("//build/config/features.gni") |
| import("//build/config/ui.gni") |
| import("//ipc/features.gni") |
| import("//mojo/public/tools/bindings/mojom.gni") |
| import("//ppapi/buildflags/buildflags.gni") |
| import("//sandbox/features.gni") |
| import("//tools/ipc_fuzzer/ipc_fuzzer.gni") |
| import("features.gni") |
| if (is_mac) { |
| import("//build/config/mac/mac_sdk.gni") |
| } |
| |
| # For feature flags internal to content. See content/public/common:features |
| # for feature flags that clients of contents need to know about. |
| buildflag_header("buildflags") { |
| header = "buildflags.h" |
| |
| flags = [ |
| "USE_EXTERNAL_POPUP_MENU=$use_external_popup_menu", |
| "ALLOW_CRITICAL_MEMORY_PRESSURE_HANDLING_IN_FOREGROUND=$allow_critical_memory_pressure_handling_in_foreground", |
| ] |
| } |
| |
| source_set("common") { |
| # Targets external to content should always link to the public API. |
| # In addition, targets outside of the content component (shell and tests) |
| # must not link to this because it will duplicate the code in the component |
| # build. |
| visibility = [ "//content/*" ] |
| |
| sources = [ |
| "accessibility_messages.h", |
| "all_messages.h", |
| "android/gin_java_bridge_errors.cc", |
| "android/gin_java_bridge_errors.h", |
| "android/gin_java_bridge_value.cc", |
| "android/gin_java_bridge_value.h", |
| "android/hash_set.cc", |
| "android/hash_set.h", |
| "android/sync_compositor_statics.cc", |
| "android/sync_compositor_statics.h", |
| "android/use_zoom_for_dsf_policy_android.cc", |
| "appcache_interfaces.cc", |
| "appcache_interfaces.h", |
| "ax_content_node_data.cc", |
| "ax_content_node_data.h", |
| "background_fetch/background_fetch_types.cc", |
| "background_fetch/background_fetch_types.h", |
| "bluetooth/web_bluetooth_device_id.cc", |
| "bluetooth/web_bluetooth_device_id.h", |
| "browser_plugin/browser_plugin_constants.cc", |
| "browser_plugin/browser_plugin_constants.h", |
| "browser_plugin/browser_plugin_messages.h", |
| "child_process_host_impl.cc", |
| "child_process_host_impl.h", |
| "common_sandbox_support_linux.cc", |
| "content_constants_internal.cc", |
| "content_constants_internal.h", |
| "content_export.h", |
| "content_ipc_logging.cc", |
| "content_message_generator.cc", |
| "content_message_generator.h", |
| "content_param_traits.cc", |
| "content_param_traits.h", |
| "content_param_traits_macros.h", |
| "content_paths.cc", |
| "content_security_policy/content_security_policy.cc", |
| "content_security_policy/content_security_policy.h", |
| "content_security_policy/csp_context.cc", |
| "content_security_policy/csp_context.h", |
| "content_security_policy/csp_directive.cc", |
| "content_security_policy/csp_directive.h", |
| "content_security_policy/csp_disposition_enum.h", |
| "content_security_policy/csp_source.cc", |
| "content_security_policy/csp_source.h", |
| "content_security_policy/csp_source_list.cc", |
| "content_security_policy/csp_source_list.h", |
| "content_security_policy_header.cc", |
| "content_security_policy_header.h", |
| "content_switches_internal.cc", |
| "content_switches_internal.h", |
| "cursors/webcursor.cc", |
| "cursors/webcursor.h", |
| "cursors/webcursor_android.cc", |
| "cursors/webcursor_aura.cc", |
| "cursors/webcursor_aurawin.cc", |
| "cursors/webcursor_aurax11.cc", |
| "cursors/webcursor_mac.mm", |
| "cursors/webcursor_ozone.cc", |
| "date_time_suggestion.h", |
| "dom_storage/dom_storage_map.cc", |
| "dom_storage/dom_storage_map.h", |
| "dom_storage/dom_storage_messages.h", |
| "dom_storage/dom_storage_types.h", |
| "drag_event_source_info.h", |
| "drag_messages.h", |
| "drag_traits.h", |
| "edit_command.h", |
| "fetch/fetch_request_type_converters.cc", |
| "fetch/fetch_request_type_converters.h", |
| "fileapi/webblob_messages.h", |
| "font_cache_dispatcher_win.cc", |
| "font_list.cc", |
| "font_list.h", |
| "font_list_android.cc", |
| "font_list_fontconfig.cc", |
| "font_list_mac.mm", |
| "font_list_win.cc", |
| "frame_message_enums.h", |
| "frame_message_structs.cc", |
| "frame_message_structs.h", |
| "frame_messages.h", |
| "frame_messages_forward.h", |
| "frame_owner_properties.cc", |
| "frame_owner_properties.h", |
| "frame_replication_state.cc", |
| "frame_replication_state.h", |
| "frame_visual_properties.cc", |
| "frame_visual_properties.h", |
| "gin_java_bridge_messages.h", |
| "in_process_child_thread_params.cc", |
| "in_process_child_thread_params.h", |
| "input/actions_parser.cc", |
| "input/actions_parser.h", |
| "input/event_with_latency_info.h", |
| "input/gesture_event_stream_validator.cc", |
| "input/gesture_event_stream_validator.h", |
| "input/ime_text_span_conversions.cc", |
| "input/ime_text_span_conversions.h", |
| "input/input_event.cc", |
| "input/input_event.h", |
| "input/input_event_ack.cc", |
| "input/input_event_ack.h", |
| "input/input_event_ack_state.cc", |
| "input/input_event_dispatch_type.h", |
| "input/input_event_stream_validator.cc", |
| "input/input_event_stream_validator.h", |
| "input/input_event_struct_traits.cc", |
| "input/input_event_struct_traits.h", |
| "input/input_param_traits.cc", |
| "input/input_param_traits.h", |
| "input/sync_compositor_messages.cc", |
| "input/sync_compositor_messages.h", |
| "input/synthetic_gesture_params.cc", |
| "input/synthetic_gesture_params.h", |
| "input/synthetic_pinch_gesture_params.cc", |
| "input/synthetic_pinch_gesture_params.h", |
| "input/synthetic_pointer_action_list_params.cc", |
| "input/synthetic_pointer_action_list_params.h", |
| "input/synthetic_pointer_action_params.cc", |
| "input/synthetic_pointer_action_params.h", |
| "input/synthetic_smooth_drag_gesture_params.cc", |
| "input/synthetic_smooth_drag_gesture_params.h", |
| "input/synthetic_smooth_scroll_gesture_params.cc", |
| "input/synthetic_smooth_scroll_gesture_params.h", |
| "input/synthetic_tap_gesture_params.cc", |
| "input/synthetic_tap_gesture_params.h", |
| "input/synthetic_web_input_event_builders.cc", |
| "input/synthetic_web_input_event_builders.h", |
| "input/touch_action_optional_struct_traits.cc", |
| "input/touch_action_optional_struct_traits.h", |
| "input/touch_event_stream_validator.cc", |
| "input/touch_event_stream_validator.h", |
| "input/web_mouse_wheel_event_traits.cc", |
| "input/web_mouse_wheel_event_traits.h", |
| "input/web_touch_event_traits.cc", |
| "input/web_touch_event_traits.h", |
| "input_messages.h", |
| "inter_process_time_ticks_converter.cc", |
| "inter_process_time_ticks_converter.h", |
| "mac/attributed_string_coder.h", |
| "mac/attributed_string_coder.mm", |
| "mac/font_loader.h", |
| "mac/font_loader.mm", |
| "media/aec_dump_messages.h", |
| "media/cdm_info.cc", |
| "media/media_player_delegate_messages.h", |
| "media/peer_connection_tracker_messages.h", |
| "mime_sniffing_throttle.cc", |
| "mime_sniffing_throttle.h", |
| "mime_sniffing_url_loader.cc", |
| "mime_sniffing_url_loader.h", |
| "navigation_gesture.h", |
| "navigation_params.cc", |
| "navigation_params.h", |
| "navigation_subresource_loader_params.cc", |
| "navigation_subresource_loader_params.h", |
| "net/record_load_histograms.cc", |
| "net/record_load_histograms.h", |
| "net/url_request_service_worker_data.cc", |
| "net/url_request_service_worker_data.h", |
| "net/url_request_user_data.cc", |
| "net/url_request_user_data.h", |
| "origin_util.cc", |
| "page_messages.h", |
| "page_state_serialization.cc", |
| "page_state_serialization.h", |
| "page_zoom.cc", |
| "pepper_file_util.cc", |
| "pepper_file_util.h", |
| "pepper_plugin_list.cc", |
| "pepper_plugin_list.h", |
| "pepper_renderer_instance_data.cc", |
| "pepper_renderer_instance_data.h", |
| "possibly_associated_interface_ptr.h", |
| "possibly_associated_interface_ptr_info.h", |
| "possibly_associated_wrapper_shared_url_loader_factory.h", |
| "process_type.cc", |
| "render_widget_surface_properties.cc", |
| "render_widget_surface_properties.h", |
| "resource_messages.h", |
| "resource_timing_info.cc", |
| "resource_timing_info.h", |
| "sandbox_init_linux.cc", |
| "sandbox_init_mac.cc", |
| "sandbox_init_win.cc", |
| "savable_subframe.h", |
| "service_manager/service_manager_connection_impl.cc", |
| "service_manager/service_manager_connection_impl.h", |
| "service_worker/service_worker_loader_helpers.cc", |
| "service_worker/service_worker_loader_helpers.h", |
| "service_worker/service_worker_types.cc", |
| "service_worker/service_worker_types.h", |
| "service_worker/service_worker_utils.cc", |
| "service_worker/service_worker_utils.h", |
| "single_request_url_loader_factory.cc", |
| "single_request_url_loader_factory.h", |
| "skia_utils.cc", |
| "skia_utils.h", |
| "swapped_out_messages.cc", |
| "swapped_out_messages.h", |
| "tab_switch_time_recorder.cc", |
| "tab_switch_time_recorder.h", |
| "task_scheduler.cc", |
| "task_scheduler.h", |
| "text_input_client_messages.h", |
| "text_input_state.cc", |
| "text_input_state.h", |
| "throttling_url_loader.cc", |
| "throttling_url_loader.h", |
| "unique_name_helper.cc", |
| "unique_name_helper.h", |
| "url_schemes.cc", |
| "url_schemes.h", |
| "user_agent.cc", |
| "view_messages.h", |
| "visual_properties.cc", |
| "visual_properties.h", |
| "widget_messages.h", |
| ] |
| |
| configs += [ |
| "//content:content_implementation", |
| "//build/config:precompiled_headers", |
| "//build/config/compiler:no_size_t_to_int_warning", |
| ] |
| |
| public_deps = [ |
| ":mojo_bindings", |
| "//cc", |
| "//gpu/command_buffer/common", |
| "//ipc", |
| "//services/network:network_service", |
| "//services/service_manager/public/cpp", |
| "//services/service_manager/sandbox", |
| "//third_party/blink/public:blink_headers", |
| "//third_party/blink/public/common", |
| "//ui/accessibility", |
| ] |
| deps = [ |
| ":buildflags", |
| "//base", |
| "//base/third_party/dynamic_annotations", |
| "//build/util:webkit_version", |
| "//components/discardable_memory/common", |
| "//components/services/filesystem/public/interfaces", |
| "//components/tracing", |
| "//components/tracing:startup_tracing", |
| "//components/viz/service", |
| "//content:resources", |
| "//content/app/resources", |
| "//content/common/service_worker:service_worker_types_proto", |
| "//content/public/common:interfaces", |
| "//content/public/common:service_names", |
| "//device/base/synchronization", |
| "//device/bluetooth", |
| "//gpu", |
| "//gpu/command_buffer/client:gles2_implementation", |
| "//gpu/command_buffer/client:gles2_interface", |
| "//gpu/command_buffer/service", |
| "//gpu/ipc/client", |
| "//gpu/ipc/common", |
| "//gpu/skia_bindings", |
| "//ipc", |
| "//media", |
| "//media:shared_memory_support", |
| "//media/base/ipc", |
| "//media/capture", |
| "//media/gpu:buildflags", |
| "//media/gpu/ipc/client", |
| "//media/gpu/ipc/common", |
| "//media/midi", |
| "//media/midi:mojo", |
| "//mojo/public/cpp/system", |
| "//net", |
| "//ppapi/buildflags", |
| "//sandbox", |
| "//sandbox:sandbox_buildflags", |
| "//services/network/public/cpp", |
| "//services/network/public/mojom", |
| "//services/resource_coordinator/public/cpp/memory_instrumentation", |
| "//services/service_manager/public/mojom", |
| "//services/service_manager/zygote:zygote_buildflags", |
| "//services/video_capture/public/mojom", |
| "//services/viz/public/interfaces", |
| "//services/ws/public/mojom", |
| "//skia", |
| "//storage/common", |
| "//third_party/angle:angle_gpu_info_util", |
| "//third_party/boringssl", |
| "//third_party/icu", |
| "//ui/base", |
| "//ui/base/ime", |
| "//ui/display", |
| "//ui/events/blink", |
| "//ui/gfx", |
| "//ui/gfx/geometry", |
| "//ui/gfx/geometry/mojo:struct_traits", |
| "//ui/gfx/ipc", |
| "//ui/gfx/ipc/color", |
| "//ui/gfx/ipc/geometry", |
| "//ui/gfx/ipc/skia", |
| "//ui/gl", |
| "//ui/gl/init", |
| "//ui/latency/ipc", |
| "//ui/shell_dialogs", |
| "//url", |
| "//url/ipc:url_ipc", |
| ] |
| |
| defines = [] |
| include_dirs = [] |
| libs = [] |
| ldflags = [] |
| |
| allow_circular_includes_from = [ |
| ":mojo_bindings", |
| "//content/public/common:interfaces", |
| ] |
| |
| if (is_android && use_seccomp_bpf) { |
| set_sources_assignment_filter([]) |
| sources += [ |
| "//services/service_manager/sandbox/linux/bpf_base_policy_linux.cc", |
| "//services/service_manager/sandbox/linux/bpf_base_policy_linux.h", |
| ] |
| set_sources_assignment_filter(sources_assignment_filter) |
| } |
| |
| if (is_mac) { |
| deps += [ "//sandbox/mac:seatbelt" ] |
| } |
| |
| if (is_android) { |
| deps += [ |
| "//content/public/android:common_aidl", |
| "//content/public/android:jni", |
| ] |
| |
| libs += [ "android" ] |
| } |
| |
| if (is_debug && !is_component_build && enable_plugins) { |
| # Content depends on the PPAPI message logging stuff; if this isn't here, |
| # some unit test binaries won't compile. This only worked in release mode |
| # because logging is disabled there. |
| deps += [ "//ppapi/proxy:ipc_sources" ] |
| } |
| |
| if (use_ozone) { |
| deps += [ "//ui/ozone" ] |
| } else { |
| sources -= [ "cursors/webcursor_ozone.cc" ] |
| } |
| |
| if (!use_aura) { |
| sources -= [ "cursors/webcursor_aura.cc" ] |
| } |
| |
| if (!use_aura || !use_x11) { |
| sources -= [ "cursors/webcursor_aurax11.cc" ] |
| } |
| |
| if (is_linux) { |
| deps += [ "//third_party/fontconfig" ] |
| } |
| |
| if (is_mac || is_win || is_android || is_fuchsia) { |
| sources -= [ "font_list_fontconfig.cc" ] |
| } |
| |
| if (enable_plugins) { |
| deps += [ |
| "//ppapi/proxy:ipc", |
| "//ppapi/shared_impl", |
| ] |
| } else { |
| sources -= [ |
| "pepper_file_util.cc", |
| "pepper_file_util.h", |
| "pepper_plugin_list.cc", |
| "pepper_plugin_list.h", |
| "pepper_renderer_instance_data.cc", |
| "pepper_renderer_instance_data.h", |
| ] |
| } |
| |
| if (!is_win || !use_aura) { |
| sources -= [ "cursors/webcursor_aurawin.cc" ] |
| } |
| |
| if (is_mac) { |
| deps += [ "//media/gpu" ] |
| } |
| |
| if (enable_ipc_fuzzer) { |
| configs += [ "//tools/ipc_fuzzer:ipc_fuzzer_config" ] |
| sources += [ |
| "external_ipc_dumper.cc", |
| "external_ipc_dumper.h", |
| ] |
| } |
| |
| if (is_fuchsia) { |
| sources += [ "font_list_fuchsia.cc" ] |
| deps += [ "//third_party/fuchsia-sdk/sdk:fdio" ] |
| } |
| } |
| |
| # See comment at the top of //content/BUILD.gn for how this works. |
| group("for_content_tests") { |
| visibility = [ "//content/test/*" ] |
| if (!is_component_build) { |
| public_deps = [ |
| ":common", |
| ] |
| } |
| } |
| |
| mojom("mojo_bindings") { |
| # This interface is internal to content. |
| visibility = [ "//content/*" ] |
| |
| # indexed_db.mojom used a native typemap that was not available in Java. |
| # indexed_db.mojom was removed in an earlier commit. This should be removed |
| # at some point. |
| cpp_only = true |
| |
| disable_variants = true |
| |
| sources = [ |
| "associated_interfaces.mojom", |
| "child.mojom", |
| "child_control.mojom", |
| "document_scoped_interface_bundle.mojom", |
| "download/mhtml_file_writer.mojom", |
| "field_trial_recorder.mojom", |
| "frame.mojom", |
| "frame_messages.mojom", |
| "frame_sink_provider.mojom", |
| "histogram_fetcher.mojom", |
| "host_zoom.mojom", |
| "image_downloader/image_downloader.mojom", |
| "input/input_handler.mojom", |
| "input/input_injector.mojom", |
| "input/synchronous_compositor.mojom", |
| "manifest_observer.mojom", |
| "media/peer_connection_tracker.mojom", |
| "media/renderer_audio_input_stream_factory.mojom", |
| "media/renderer_audio_output_stream_factory.mojom", |
| "native_types.mojom", |
| "navigation_client.mojom", |
| "navigation_params.mojom", |
| "page_state.mojom", |
| "push_messaging.mojom", |
| "render_frame_message_filter.mojom", |
| "render_frame_metadata.mojom", |
| "render_message_filter.mojom", |
| "render_widget_window_tree_client_factory.mojom", |
| "renderer.mojom", |
| "renderer_host.mojom", |
| "widget.mojom", |
| ] |
| |
| if (is_mac) { |
| sources += [ |
| "render_widget_host_ns_view.mojom", |
| "sandbox_support_mac.mojom", |
| ] |
| } |
| |
| enabled_features = [] |
| if (enable_ipc_logging) { |
| enabled_features += [ "ipc_logging" ] |
| } |
| if (is_linux || is_chromeos) { |
| enabled_features += [ "supports_thread_priorities" ] |
| } |
| |
| import_dirs = [ "//mojo/services" ] |
| |
| public_deps = [ |
| "//components/services/leveldb/public/interfaces", |
| "//content/public/common:interfaces", |
| "//content/public/common:resource_type_bindings", |
| "//ipc:mojom_constants", |
| "//media/capture/mojom:video_capture", |
| "//media/mojo/interfaces", |
| "//mojo/public/mojom/base", |
| "//services/audio/public/mojom", |
| "//services/network/public/mojom", |
| "//services/service_manager/public/mojom", |
| "//services/video_capture/public/mojom", |
| "//services/viz/public/interfaces", |
| "//services/ws/public/mojom", |
| "//skia/public/interfaces", |
| "//third_party/blink/public:mojo_bindings", |
| "//third_party/blink/public/mojom:mojom_core", |
| "//third_party/blink/public/mojom:web_feature_mojo_bindings", |
| "//ui/base/ime/mojo", |
| "//ui/base/mojo", |
| "//ui/events/mojo:interfaces", |
| "//ui/gfx/geometry/mojo", |
| "//ui/gfx/mojo", |
| "//ui/gfx/range/mojo", |
| "//ui/latency/mojo:interfaces", |
| "//url/mojom:url_mojom_gurl", |
| "//url/mojom:url_mojom_origin", |
| ] |
| |
| overridden_deps = [ "//third_party/blink/public/mojom:mojom_core" ] |
| component_deps = [ "//third_party/blink/public/common" ] |
| |
| component_output_prefix = "content_common_mojo_bindings" |
| export_class_attribute = "CONTENT_EXPORT" |
| export_define = "CONTENT_IMPLEMENTATION=1" |
| export_header = "content/common/content_export.h" |
| } |