blob: 4e199ab35484fad74a19e7348e49d960b0ab0b2f [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("//mojo/public/tools/bindings/mojom.gni")
import("//third_party/blink/public/public_features.gni")
# This target includes all mojom interfaces which can be used from
# renderer/platform. In particular these mojom interfaces can't use types that
# are typemapped to a type in renderer/core.
mojom("mojom_platform") {
sources = [
"ad_tagging/ad_frame.mojom",
"app_banner/app_banner.mojom",
"appcache/appcache.mojom",
"appcache/appcache_info.mojom",
"array_buffer/array_buffer_contents.mojom",
"associated_interfaces/associated_interfaces.mojom",
"autoplay/autoplay.mojom",
"background_fetch/background_fetch.mojom",
"background_sync/background_sync.mojom",
"badging/badging.mojom",
"blob/blob.mojom",
"blob/blob_registry.mojom",
"blob/blob_url_store.mojom",
"blob/data_element.mojom",
"blob/serialized_blob.mojom",
"cache_storage/cache_storage.mojom",
"choosers/color_chooser.mojom",
"choosers/file_chooser.mojom",
"clipboard/clipboard.mojom",
"commit_result/commit_result.mojom",
"contacts/contacts_manager.mojom",
"cookie_store/cookie_store.mojom",
"crash/crash_memory_metrics_reporter.mojom",
"credentialmanager/credential_manager.mojom",
"csp/content_security_policy.mojom",
"devtools/console_message.mojom",
"devtools/devtools_agent.mojom",
"devtools/devtools_frontend.mojom",
"dom_storage/session_storage_namespace.mojom",
"dom_storage/storage_area.mojom",
"dom_storage/storage_partition_service.mojom",
"feature_policy/feature_policy.mojom",
"fetch/fetch_api_request.mojom",
"fetch/fetch_api_response.mojom",
"file/file_utilities.mojom",
"filesystem/file_system.mojom",
"filesystem/file_writer.mojom",
"frame/document_interface_broker.mojom",
"frame/find_in_page.mojom",
"frame/frame_host_test_interface.mojom",
"frame/lifecycle.mojom",
"frame/navigation_initiator.mojom",
"geolocation/geolocation_service.mojom",
"hyphenation/hyphenation.mojom",
"insecure_input/insecure_input_service.mojom",
"keyboard_lock/keyboard_lock.mojom",
"leak_detector/leak_detector.mojom",
"loader/code_cache.mojom",
"loader/navigation_predictor.mojom",
"loader/pause_subresource_loading_handle.mojom",
"loader/previews_resource_loading_hints.mojom",
"loader/url_loader_factory_bundle.mojom",
"locks/lock_manager.mojom",
"manifest/display_mode.mojom",
"manifest/manifest.mojom",
"manifest/manifest_manager.mojom",
"mediastream/media_devices.mojom",
"mediastream/media_stream.mojom",
"mime/mime_registry.mojom",
"net/ip_address_space.mojom",
"notifications/notification.mojom",
"oom_intervention/oom_intervention.mojom",
"page/display_cutout.mojom",
"payments/payment_app.mojom",
"permissions/permission.mojom",
"permissions/permission_status.mojom",
"picture_in_picture/picture_in_picture.mojom",
"plugins/plugin_registry.mojom",
"presentation/presentation.mojom",
"quota/quota_dispatcher_host.mojom",
"quota/quota_types.mojom",
"referrer.mojom",
"renderer_preference_watcher.mojom",
"renderer_preferences.mojom",
"reporting/reporting.mojom",
"script/script_type.mojom",
"selection_menu/selection_menu_behavior.mojom",
"service_worker/dispatch_fetch_event_params.mojom",
"service_worker/navigation_preload_state.mojom",
"service_worker/service_worker_client.mojom",
"service_worker/service_worker_error_type.mojom",
"service_worker/service_worker_event_status.mojom",
"service_worker/service_worker_fetch_response_callback.mojom",
"service_worker/service_worker_installed_scripts_manager.mojom",
"service_worker/service_worker_provider_type.mojom",
"service_worker/service_worker_state.mojom",
"service_worker/service_worker_stream_handle.mojom",
"site_engagement/site_engagement.mojom",
"speech/speech_recognition_error.mojom",
"speech/speech_recognition_grammar.mojom",
"speech/speech_recognition_result.mojom",
"speech/speech_recognizer.mojom",
"ukm/ukm.mojom",
"use_counter/css_property_id.mojom",
"user_agent/user_agent_metadata.mojom",
"v8_cache_options.mojom",
"wake_lock/wake_lock.mojom",
"webaudio/audio_context_manager.mojom",
"webdatabase/web_database.mojom",
"window_features/window_features.mojom",
"worker/shared_worker.mojom",
"worker/shared_worker_client.mojom",
"worker/shared_worker_connector.mojom",
"worker/shared_worker_creation_context_type.mojom",
"worker/shared_worker_host.mojom",
"worker/shared_worker_info.mojom",
"worker/worker_content_settings_proxy.mojom",
"worker/worker_main_script_load_params.mojom",
]
if (!is_android) {
sources += [ "serial/serial.mojom" ]
}
if (is_win) {
sources += [ "dwrite_font_proxy/dwrite_font_proxy.mojom" ]
}
public_deps = [
":android_mojo_bindings",
":mojom_mhtml_load_result",
":speech_recognition_error_code",
":web_client_hints_types_mojo_bindings",
":web_feature_mojo_bindings",
"//components/payments/mojom",
"//components/services/filesystem/public/interfaces",
"//mojo/public/mojom/base",
"//services/device/public/mojom",
"//services/network/public/mojom",
"//services/service_manager/public/mojom",
"//services/viz/public/interfaces",
"//skia/public/interfaces",
"//third_party/blink/public/mojom/usb",
"//ui/gfx/geometry/mojo",
"//ui/gfx/mojo",
"//url/mojom:url_mojom_gurl",
"//url/mojom:url_mojom_origin",
]
# iOS doesn't use and must not depend on //media
if (!is_ios) {
public_deps += [
"//media/capture/mojom:video_capture",
"//media/mojo/interfaces",
]
}
if (is_linux || is_chromeos) {
enabled_features = [ "renderer_pref_system_font_family_name" ]
}
export_class_attribute = "BLINK_COMMON_EXPORT"
export_define = "BLINK_COMMON_IMPLEMENTATION=1"
export_header = "third_party/blink/public/common/common_export.h"
export_class_attribute_blink = "PLATFORM_EXPORT"
export_define_blink = "BLINK_PLATFORM_IMPLEMENTATION=1"
export_header_blink = "third_party/blink/renderer/platform/platform_export.h"
}
# Kept separate from "mojom_platform" because the Java bindings are specifically
# needed by Android's implementation of payments and webshare
# (in components/payments/content/android and chrome/android/),
# input (in android_webview/ and content/browser/android/) and
# remote objects(in content/public/android/).
mojom("android_mojo_bindings") {
sources = [
"input/input_host.mojom",
"input/input_messages.mojom",
"payments/payment_request.mojom",
"remote_objects/remote_objects.mojom",
"webshare/webshare.mojom",
]
public_deps = [
"//components/payments/mojom",
"//mojo/public/mojom/base",
"//url/mojom:url_mojom_gurl",
"//url/mojom:url_mojom_origin",
]
# This Android unhandled-tap feature uses another mojo source, add it in.
if (enable_unhandled_tap) {
sources += [ "unhandled_tap_notifier/unhandled_tap_notifier.mojom" ]
public_deps += [ "//ui/gfx/geometry/mojo" ]
}
export_class_attribute = "BLINK_COMMON_EXPORT"
export_define = "BLINK_COMMON_IMPLEMENTATION=1"
export_header = "third_party/blink/public/common/common_export.h"
export_class_attribute_blink = "PLATFORM_EXPORT"
export_define_blink = "BLINK_PLATFORM_IMPLEMENTATION=1"
export_header_blink = "third_party/blink/renderer/platform/platform_export.h"
}
# Kept separate from "mojom_platform" because the Java bindings are needed by
# Android's implementation of speech recognition.
mojom_component("speech_recognition_error_code") {
sources = [
"speech/speech_recognition_error_code.mojom",
]
macro_prefix = "SPEECH_RECOGNITION_ERROR_CODE_MOJOM"
output_prefix = "speech_recognition_error_code_mojom"
}
# This target can include mojom interfaces which do use types that are
# typemapped to a type in renderer/core. This also means these interfaces are
# not available from renderer/platform.
#
# In future we may have a separate mojom target for the things that may have
# modules dependencies if it looks necessary, at that time we can put all of
# those high-level service worker mojom files there.
mojom("mojom_core") {
sources = [
"messaging/cloneable_message.mojom",
"messaging/transferable_message.mojom",
"messaging/user_activation_snapshot.mojom",
"portal/portal.mojom",
# Note that service_worker_object.mojom and service_worker.mojom depend on
# transferable_message.mojom, and controller_service_worker.mojom and
# service_worker_registration.mojom depend on service_worker_object.mojom,
# so we put these service worker mojom files here rather than mojom_platform
# target.
"service_worker/controller_service_worker.mojom",
"service_worker/embedded_worker.mojom",
"service_worker/service_worker.mojom",
"service_worker/service_worker_container.mojom",
"service_worker/service_worker_object.mojom",
"service_worker/service_worker_provider.mojom",
"service_worker/service_worker_registration.mojom",
# Depends on controller_service_worker.mojom.
"worker/dedicated_worker_host_factory.mojom",
"worker/shared_worker_factory.mojom",
]
public_deps = [
":mojom_platform",
":web_feature_mojo_bindings",
"//components/payments/mojom",
"//mojo/public/mojom/base",
"//services/network/public/mojom",
"//services/service_manager/public/mojom",
"//skia/public/interfaces",
"//url/mojom:url_mojom_gurl",
"//url/mojom:url_mojom_origin",
]
overridden_deps_blink = [
":mojom_platform",
"//services/network/public/mojom",
]
component_deps_blink = [ "//third_party/blink/renderer/platform" ]
export_class_attribute = "BLINK_COMMON_EXPORT"
export_define = "BLINK_COMMON_IMPLEMENTATION=1"
export_header = "third_party/blink/public/common/common_export.h"
export_class_attribute_blink = "CORE_EXPORT"
export_define_blink = "BLINK_CORE_IMPLEMENTATION=1"
export_header_blink = "third_party/blink/renderer/core/core_export.h"
}
# This target can include mojom interfaces which use types that are typemapped
# to a type in renderer/modules. This also means these interfaces are not
# available from renderer/platform or renderer/core.
mojom("mojom_modules") {
sources = [
"indexeddb/indexeddb.mojom",
]
public_deps = [
":mojom_core",
# TODO(https://crbug.com/822804): Remove when mojom bindings deps checks
# get fixed.
":mojom_platform",
"//mojo/public/mojom/base",
"//skia/public/interfaces",
"//url/mojom:url_mojom_gurl",
"//url/mojom:url_mojom_origin",
]
overridden_deps_blink = [
":mojom_core",
":mojom_platform",
]
component_deps_blink = [ "//third_party/blink/renderer/core" ]
export_class_attribute = "BLINK_COMMON_EXPORT"
export_define = "BLINK_COMMON_IMPLEMENTATION=1"
export_header = "third_party/blink/public/common/common_export.h"
export_class_attribute_blink = "MODULES_EXPORT"
export_define_blink = "BLINK_MODULES_IMPLEMENTATION=1"
export_header_blink = "third_party/blink/renderer/modules/modules_export.h"
}
mojom("mojom_mhtml_load_result") {
sources = [
"loader/mhtml_load_result.mojom",
]
export_class_attribute = "BLINK_COMMON_EXPORT"
export_define = "BLINK_COMMON_IMPLEMENTATION=1"
export_header = "third_party/blink/public/common/common_export.h"
}
# The web_feature_mojo_bindings is separated from the rest of the mojom files
# because the chromium typemap for blink mojo_bindings has private content
# dependencies.
mojom_component("web_feature_mojo_bindings") {
sources = [
"web_feature/web_feature.mojom",
]
macro_prefix = "WEB_FEATURE_MOJO_BINDINGS_MOJOM"
output_prefix = "web_feature_mojo_bindings_mojom"
}
# The web_client_hints_types_mojo_bindings is separated from the rest of the
# mojom files because the chromium typemap for blink mojo_bindings has private
# content dependencies.
mojom("web_client_hints_types_mojo_bindings") {
sources = [
"web_client_hints/web_client_hints_types.mojom",
]
}