blob: 1b41669fdb4e713355581f87153ec3f3ee454753 [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/config/ui.gni")
import("//mojo/public/tools/bindings/mojom.gni")
import("//third_party/blink/public/public_features.gni")
if (is_android) {
import("//build/config/android/config.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.
#
# Source targets outside of Blink that want to depend on mojom_platform should
# instead depend on //content/public/common, which ultimately exposes it as a
# public dependency. This is because the non-Blink variant of the
# mojom_platform C++ bindings is linked into the //content component and
# //content/public/common has private dependencies there.
mojom("mojom_platform") {
generate_java = true
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",
"browser_interface_broker.mojom",
"buckets/bucket_manager_host.mojom",
"cache_storage/cache_storage.mojom",
"choosers/color_chooser.mojom",
"choosers/date_time_chooser.mojom",
"choosers/file_chooser.mojom",
"choosers/popup_menu.mojom",
"clipboard/clipboard.mojom",
"clipboard/raw_clipboard.mojom",
"commit_result/commit_result.mojom",
"content_index/content_index.mojom",
"context_menu/context_menu.mojom",
"conversions/conversions.mojom",
"cookie_store/cookie_store.mojom",
"crash/crash_memory_metrics_reporter.mojom",
"credentialmanager/credential_manager.mojom",
"css/preferred_color_scheme.mojom",
"css/preferred_contrast.mojom",
"data_transfer/data_transfer.mojom",
"device/device.mojom",
"devtools/console_message.mojom",
"devtools/devtools_agent.mojom",
"devtools/devtools_frontend.mojom",
"devtools/inspector_issue.mojom",
"disk_allocator.mojom",
"favicon/favicon_url.mojom",
"feature_observer/feature_observer.mojom",
"feature_policy/document_policy_feature.mojom",
"feature_policy/feature_policy.mojom",
"feature_policy/feature_policy_feature.mojom",
"feature_policy/policy_disposition.mojom",
"feature_policy/policy_value.mojom",
"federated_learning/floc.mojom",
"fetch/fetch_api_request.mojom",
"fetch/fetch_api_response.mojom",
"file/file_utilities.mojom",
"file_system_access/file_system_access_data_transfer_token.mojom",
"file_system_access/file_system_access_directory_handle.mojom",
"file_system_access/file_system_access_error.mojom",
"file_system_access/file_system_access_file_handle.mojom",
"file_system_access/file_system_access_file_writer.mojom",
"file_system_access/file_system_access_manager.mojom",
"file_system_access/file_system_access_transfer_token.mojom",
"filesystem/file_system.mojom",
"font_access/font_access.mojom",
"geolocation/geolocation_service.mojom",
"hid/hid.mojom",
"hyphenation/hyphenation.mojom",
"idle/idle_manager.mojom",
"image_downloader/image_downloader.mojom",
"input/focus_type.mojom",
"input/gesture_event.mojom",
"input/input_event.mojom",
"input/input_event_result.mojom",
"input/input_handler.mojom",
"input/pointer_lock_context.mojom",
"input/pointer_lock_result.mojom",
"input/scroll_direction.mojom",
"input/touch_event.mojom",
"insecure_input/insecure_input_service.mojom",
"keyboard_lock/keyboard_lock.mojom",
"leak_detector/leak_detector.mojom",
"link_to_text/link_to_text.mojom",
"loader/code_cache.mojom",
"loader/content_security_notifier.mojom",
"loader/fetch_client_settings_object.mojom",
"loader/mixed_content.mojom",
"loader/navigation_predictor.mojom",
"loader/pause_subresource_loading_handle.mojom",
"loader/referrer.mojom",
"loader/request_context_frame_type.mojom",
"loader/resource_load_info.mojom",
"loader/resource_load_info_notifier.mojom",
"loader/transferrable_url_loader.mojom",
"loader/url_loader_factory_bundle.mojom",
"locks/lock_manager.mojom",
"manifest/capture_links.mojom",
"manifest/display_mode.mojom",
"manifest/manifest.mojom",
"manifest/manifest_manager.mojom",
"manifest/manifest_observer.mojom",
"media/fullscreen_video_element.mojom",
"media/renderer_audio_input_stream_factory.mojom",
"media/renderer_audio_output_stream_factory.mojom",
"mediastream/aec_dump.mojom",
"mediastream/media_devices.mojom",
"mediastream/media_stream.mojom",
"mime/mime_registry.mojom",
"modal_close_watcher/modal_close_listener.mojom",
"native_io/native_io.mojom",
"notifications/notification.mojom",
"notifications/notification_service.mojom",
"oom_intervention/oom_intervention.mojom",
"optimization_guide/optimization_guide.mojom",
"page/display_cutout.mojom",
"page/drag.mojom",
"page/page.mojom",
"page/page_visibility_state.mojom",
"page/record_content_to_visible_time_request.mojom",
"page/widget.mojom",
"page_state/page_state.mojom",
"payments/payment_app.mojom",
"payments/payment_credential.mojom",
"peerconnection/peer_connection_tracker.mojom",
"performance_manager/v8_detailed_memory_reporter.mojom",
"permissions/permission.mojom",
"permissions/permission_automation.mojom",
"permissions/permission_status.mojom",
"picture_in_picture/picture_in_picture.mojom",
"plugins/plugin_registry.mojom",
"prerender/prerender.mojom",
"presentation/presentation.mojom",
"push_messaging/push_messaging.mojom",
"push_messaging/push_messaging_status.mojom",
"quota/quota_manager_host.mojom",
"quota/quota_types.mojom",
"renderer_preference_watcher.mojom",
"renderer_preferences.mojom",
"reporting/reporting.mojom",
"screen_enumeration/screen_enumeration.mojom",
"scroll/scroll_enums.mojom",
"scroll/scroll_into_view_params.mojom",
"scroll/scrollbar_mode.mojom",
"security_context/insecure_request_policy.mojom",
"selection_menu/selection_menu_behavior.mojom",
"service_worker/controller_service_worker_mode.mojom",
"service_worker/dispatch_fetch_event_params.mojom",
"service_worker/service_worker_client.mojom",
"service_worker/service_worker_container_type.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_state.mojom",
"service_worker/service_worker_stream_handle.mojom",
"site_engagement/site_engagement.mojom",
"sms/webotp_service.mojom",
"speech/speech_recognition_error.mojom",
"speech/speech_recognition_error_code.mojom",
"speech/speech_recognition_grammar.mojom",
"speech/speech_recognition_result.mojom",
"speech/speech_recognizer.mojom",
"speech/speech_synthesis.mojom",
"storage_access/storage_access_automation.mojom",
"timing/performance_mark_or_measure.mojom",
"timing/resource_timing.mojom",
"timing/worker_timing_container.mojom",
"user_agent/user_agent_metadata.mojom",
"v8_cache_options.mojom",
"wake_lock/wake_lock.mojom",
"web_launch/file_handling_expiry.mojom",
"web_launch/web_launch.mojom",
"webaudio/audio_context_manager.mojom",
"webdatabase/web_database.mojom",
"webid/federated_auth_request.mojom",
"webid/federated_auth_response.mojom",
"webpreferences/web_preferences.mojom",
"websockets/websocket_connector.mojom",
"webtransport/quic_transport_connector.mojom",
"widget/device_emulation_params.mojom",
"widget/screen_info.mojom",
"widget/screen_orientation.mojom",
"widget/visual_properties.mojom",
"window_features/window_features.mojom",
"worker/dedicated_worker_host.mojom",
"worker/shared_worker_client.mojom",
"worker/shared_worker_creation_context_type.mojom",
"worker/shared_worker_host.mojom",
"worker/shared_worker_info.mojom",
"worker/subresource_loader_updater.mojom",
"worker/worker_content_settings_proxy.mojom",
"worker/worker_main_script_load_params.mojom",
"worker/worker_options.mojom",
]
if (is_android) {
sources += [ "input/synchronous_compositor.mojom" ]
}
if (is_win) {
sources += [ "dwrite_font_proxy/dwrite_font_proxy.mojom" ]
}
if (is_mac) {
sources += [ "input/text_input_host.mojom" ]
}
public_deps = [
":android_mojo_bindings",
":authenticator_test_mojo_bindings",
":color_scheme_mojo_bindings",
":mojom_mhtml_load_result",
":script_type_mojo_bindings",
":web_feature_mojo_bindings",
"//cc/mojom",
"//components/payments/mojom",
"//components/schema_org/common:mojom",
"//components/services/filesystem/public/mojom",
"//mojo/public/mojom/base",
"//services/data_decoder/public/mojom:mojom_resource_snapshot_for_web_bundle",
"//services/device/public/mojom",
"//services/network/public/mojom",
"//services/network/public/mojom:mojom_ip_address",
"//services/network/public/mojom:url_loader_base",
"//services/network/public/mojom:websocket_mojom",
"//services/service_manager/public/mojom",
"//services/viz/public/mojom",
"//skia/public/mojom",
"//third_party/blink/public/mojom/dom_storage",
"//third_party/blink/public/mojom/frame",
"//third_party/blink/public/mojom/gpu",
"//third_party/blink/public/mojom/service_worker:storage",
"//third_party/blink/public/mojom/tokens",
"//third_party/blink/public/mojom/usb",
"//ui/base/cursor/mojom",
"//ui/base/dragdrop/mojom",
"//ui/base/ime/mojom",
"//ui/base/mojom",
"//ui/display/mojom",
"//ui/events/mojom",
"//ui/gfx/geometry/mojom",
"//ui/gfx/mojom",
"//ui/gfx/range/mojom",
"//url/mojom:url_mojom_gurl",
"//url/mojom:url_mojom_origin",
]
if (is_android) {
# Direct deps (instead of transitive deps) are necessary for java targets.
public_deps += [
"//services/network/public/mojom:cookies_mojom",
"//services/network/public/mojom:mojom_network_param",
"//ui/latency/mojom",
]
} else {
sources += [
"direct_sockets/direct_sockets.mojom",
"serial/serial.mojom",
]
}
if (is_mac) {
public_deps += [
"//ui/base/mojom",
"//ui/gfx/range/mojom",
]
}
# iOS doesn't use and must not depend on //media
if (!is_ios) {
public_deps += [
"//media/capture/mojom:video_capture",
"//media/mojo/mojom",
]
}
enabled_features = []
if (is_linux || is_chromeos) {
enabled_features += [ "renderer_pref_system_font_family_name" ]
}
if (use_x11 || use_ozone) {
enabled_features += [ "is_selection_clipboard_buffer_possible" ]
}
shared_cpp_typemaps = [
{
types = [
{
mojom = "blink.mojom.AllowedDragOperations"
cpp = "::blink::DragOperationsMask"
copyable_pass_by_value = true
},
]
traits_headers =
[ "//third_party/blink/public/common/page/drag_mojom_traits.h" ]
traits_public_deps = [ "//third_party/blink/public/common:headers" ]
},
{
types = [
{
mojom = "blink.mojom.Event"
cpp = "::std::unique_ptr<::blink::WebCoalescedInputEvent>"
move_only = true
},
]
traits_headers = [ "//third_party/blink/public/common/input/web_coalesced_input_event_mojom_traits.h" ]
},
{
types = [
{
mojom = "blink.mojom.ParsedFeaturePolicyDeclaration"
cpp = "::blink::ParsedFeaturePolicyDeclaration"
},
]
traits_headers = [ "//third_party/blink/public/common/feature_policy/feature_policy_forward.h" ]
traits_private_headers = [ "//third_party/blink/common/feature_policy/feature_policy_mojom_traits.h" ]
},
{
types = [
{
mojom = "blink.mojom.FramePolicy"
cpp = "::blink::FramePolicy"
},
]
traits_headers =
[ "//third_party/blink/common/frame/frame_policy_mojom_traits.h" ]
},
{
types = [
{
mojom = "blink.mojom.MediaDeviceInfo"
cpp = "::blink::WebMediaDeviceInfo"
},
]
traits_headers = [ "//third_party/blink/public/common/mediastream/media_devices_mojom_traits.h" ]
},
{
types = [
{
mojom = "blink.mojom.MediaStreamDevice"
cpp = "::blink::MediaStreamDevice"
},
{
mojom = "blink.mojom.StreamControls"
cpp = "::blink::StreamControls"
},
{
mojom = "blink.mojom.TrackControls"
cpp = "::blink::TrackControls"
},
]
traits_headers = [ "//third_party/blink/public/common/mediastream/media_stream_mojom_traits.h" ]
},
{
types = [
{
mojom = "blink.mojom.ScreenInfo"
cpp = "::blink::ScreenInfo"
},
]
traits_headers = [
"//third_party/blink/public/common/widget/screen_info_mojom_traits.h",
]
},
{
types = [
{
mojom = "blink.mojom.VisualProperties"
cpp = "::blink::VisualProperties"
},
]
traits_headers = [ "//third_party/blink/public/common/widget/visual_properties_mojom_traits.h" ]
},
{
types = [
{
mojom = "blink.mojom.FrameVisualProperties"
cpp = "::blink::FrameVisualProperties"
},
]
traits_headers = [ "//third_party/blink/public/common/frame/frame_visual_properties_mojom_traits.h" ]
},
{
types = [
{
mojom = "blink.mojom.DeviceEmulationParams"
cpp = "::blink::DeviceEmulationParams"
},
]
traits_headers = [ "//third_party/blink/public/common/widget/device_emulation_params_mojom_traits.h" ]
},
{
types = [
{
mojom = "blink.mojom.URLLoaderFactoryBundle"
cpp = "::std::unique_ptr<::blink::PendingURLLoaderFactoryBundle>"
nullable_is_same_type = true
move_only = true
},
]
traits_headers = [ "//third_party/blink/public/common/loader/url_loader_factory_bundle_mojom_traits.h" ]
traits_public_deps = [ "//url/mojom:mojom_traits" ]
},
{
types = [
{
mojom = "blink.mojom.RendererPreferences"
cpp = "::blink::RendererPreferences"
},
]
traits_headers = [ "//third_party/blink/public/common/renderer_preferences/renderer_preferences_mojom_traits.h" ]
},
{
types = [
{
mojom = "blink.mojom.WebPreferences"
cpp = "::blink::web_pref::WebPreferences"
},
]
traits_headers = [ "//third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h" ]
},
{
types = [
{
mojom = "blink.mojom.Impression"
cpp = "::blink::Impression"
},
{
mojom = "blink.mojom.CustomContextMenuItemContext"
cpp = "::blink::MenuItem"
},
{
mojom = "blink.mojom.UntrustworthyContextMenuParams"
cpp = "::blink::UntrustworthyContextMenuParams"
},
]
traits_headers = [ "//third_party/blink/public/common/context_menu_data/context_menu_mojom_traits.h" ]
},
]
cpp_typemaps = [
{
types = [
{
mojom = "blink.mojom.ClipboardBuffer"
cpp = "::ui::ClipboardBuffer"
},
]
traits_headers = [ "//ui/base/mojom/clipboard_blink_mojom_traits.h" ]
traits_public_deps = [ "//ui/base/clipboard:clipboard_types" ]
},
{
types = [
{
mojom = "blink.mojom.CredentialType"
cpp = "::password_manager::CredentialType"
},
{
mojom = "blink.mojom.CredentialMediationRequirement"
cpp = "::password_manager::CredentialMediationRequirement"
},
{
mojom = "blink.mojom.CredentialInfo"
cpp = "::password_manager::CredentialInfo"
},
{
mojom = "blink.mojom.CredentialManagerError"
cpp = "::password_manager::CredentialManagerError"
},
]
traits_headers = [ "//components/password_manager/content/common/credential_manager_mojom_traits.h" ]
traits_sources = [ "//components/password_manager/content/common/credential_manager_mojom_traits.cc" ]
traits_public_deps = [
"//base",
"//components/password_manager/core/common",
]
},
{
types = [
{
mojom = "blink.mojom.FetchAPIDataElement"
cpp = "::network::DataElement"
move_only = true
},
{
mojom = "blink.mojom.FetchAPIRequestBody"
cpp = "::scoped_refptr<::network::ResourceRequestBody>"
nullable_is_same_type = true
copyable_pass_by_value = true
},
]
traits_headers = [ "//third_party/blink/public/common/fetch/fetch_api_request_body_mojom_traits.h" ]
traits_public_deps = [
"//base",
"//services/network/public/cpp:cpp_base",
]
},
{
types = [
{
mojom = "blink.mojom.FetchAPIRequestHeaders"
cpp = "::blink::FetchAPIRequestHeadersMap"
move_only = true
},
]
traits_headers = [ "//third_party/blink/public/common/fetch/fetch_api_request_headers_mojom_traits.h" ]
},
{
types = [
{
mojom = "blink.mojom.Manifest"
cpp = "::blink::Manifest"
nullable_is_same_type = true
},
{
mojom = "blink.mojom.ManifestImageResource"
cpp = "::blink::Manifest::ImageResource"
},
{
mojom = "blink.mojom.ManifestRelatedApplication"
cpp = "::blink::Manifest::RelatedApplication"
},
{
mojom = "blink.mojom.ManifestShareTarget"
cpp = "::blink::Manifest::ShareTarget"
},
{
mojom = "blink.mojom.ManifestShortcutItem"
cpp = "::blink::Manifest::ShortcutItem"
},
]
traits_headers = [
"//third_party/blink/public/common/manifest/manifest.h",
"//third_party/blink/public/common/common_export.h",
]
traits_private_headers = [
"//third_party/blink/public/common/manifest/manifest_mojom_traits.h",
]
traits_sources =
[ "//third_party/blink/common/manifest/manifest_mojom_traits.cc" ]
traits_deps = [ "//ui/gfx/geometry/mojom:mojom_traits" ]
},
{
types = [
{
mojom = "blink.mojom.NotificationData"
cpp = "::blink::PlatformNotificationData"
},
{
mojom = "blink.mojom.NotificationResources"
cpp = "::blink::NotificationResources"
},
]
traits_headers = [ "//third_party/blink/public/common/notifications/notification_mojom_traits.h" ]
},
{
types = [
{
mojom = "blink.mojom.PolicyValue"
cpp = "::blink::PolicyValue"
},
]
traits_headers = [
"//third_party/blink/common/feature_policy/policy_value_mojom_traits.h",
]
traits_sources = [ "//third_party/blink/common/feature_policy/policy_value_mojom_traits.cc" ]
},
{
types = [
{
mojom = "blink.mojom.UserAgentBrandVersion"
cpp = "::blink::UserAgentBrandVersion"
},
{
mojom = "blink.mojom.UserAgentMetadata"
cpp = "::blink::UserAgentMetadata"
},
{
mojom = "blink.mojom.UserAgentOverride"
cpp = "::blink::UserAgentOverride"
},
]
traits_headers = [ "//third_party/blink/public/common/user_agent/user_agent_mojom_traits.h" ]
traits_sources =
[ "//third_party/blink/common/user_agent/user_agent_mojom_traits.cc" ]
},
]
blink_cpp_typemaps = [
{
types = [
{
mojom = "blink.mojom.DragData"
cpp = "::blink::WebDragData"
},
]
traits_headers =
[ "//third_party/blink/renderer/platform/mojo/drag_mojom_traits.h" ]
},
{
types = [
{
mojom = "blink.mojom.FetchAPIRequestBody"
cpp = "::blink::ResourceRequestBody"
nullable_is_same_type = true
move_only = true
},
]
traits_headers = [
"//third_party/blink/renderer/platform/loader/fetch/resource_request.h",
]
traits_private_headers = [ "//third_party/blink/renderer/platform/loader/fetch/fetch_api_request_body_mojom_traits.h" ]
traits_deps =
[ "//third_party/blink/renderer/platform/network:make_generated" ]
},
{
types = [
{
mojom = "blink.mojom.FetchAPIRequestHeaders"
cpp =
"::WTF::HashMap<::WTF::String, WTF::String, WTF::CaseFoldingHash>"
move_only = true
},
]
traits_headers = [ "//third_party/blink/renderer/platform/mojo/fetch_api_request_headers_mojom_traits.h" ]
traits_public_deps = [ "//third_party/blink/renderer/platform/wtf" ]
},
]
cpp_typemaps += shared_cpp_typemaps
blink_cpp_typemaps += shared_cpp_typemaps
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"
# Don't scramble message IDs so they are redistributable to external tests.
scramble_message_ids = false
}
# Kept separate from "mojom_platform" because the Java bindings are
# needed by Android's implementation (in chrome/android or in android_webview)
# for following mojom files.
mojom("android_mojo_bindings") {
generate_java = true
sources = [
"android_font_lookup/android_font_lookup.mojom",
"blob/blob.mojom",
"blob/blob_registry.mojom",
"blob/blob_url_store.mojom",
"blob/data_element.mojom",
"blob/serialized_blob.mojom",
"contacts/contacts_manager.mojom",
"digital_goods/digital_goods.mojom",
"document_metadata/document_metadata.mojom",
"font_unique_name_lookup/font_unique_name_lookup.mojom",
"handwriting/handwriting.mojom",
"input/input_host.mojom",
"input/input_messages.mojom",
"installation/installation.mojom",
"installedapp/installed_app_provider.mojom",
"installedapp/related_application.mojom",
"mediasession/media_session.mojom",
"payments/payment_handler_host.mojom",
"payments/payment_request.mojom",
"webauthn/authenticator.mojom",
"webshare/share_error.mojom",
"webshare/webshare.mojom",
]
public_deps = [
"//components/payments/mojom",
"//components/schema_org/common:mojom",
"//mojo/public/mojom/base",
"//services/media_session/public/mojom",
"//services/network/public/mojom",
"//url/mojom:url_mojom_gurl",
"//url/mojom:url_mojom_origin",
]
if (is_android) {
sources += [ "remote_objects/remote_objects.mojom" ]
# Direct deps (instead of transitive deps) are necessary for java targets.
public_deps += [ "//services/network/public/mojom:url_loader_base" ]
}
# 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/mojom" ]
}
cpp_typemaps = [
{
types = [
{
mojom = "blink.mojom.AuthenticatorTransport"
cpp = "::device::FidoTransportProtocol"
},
{
mojom = "blink.mojom.PublicKeyCredentialType"
cpp = "::device::CredentialType"
},
{
mojom = "blink.mojom.PublicKeyCredentialParameters"
cpp = "::device::PublicKeyCredentialParams::CredentialInfo"
},
{
mojom = "blink.mojom.PublicKeyCredentialDescriptor"
cpp = "::device::PublicKeyCredentialDescriptor"
},
{
mojom = "blink.mojom.AuthenticatorAttachment"
cpp = "::device::AuthenticatorAttachment"
},
{
mojom = "blink.mojom.UserVerificationRequirement"
cpp = "::device::UserVerificationRequirement"
},
{
mojom = "blink.mojom.AuthenticatorSelectionCriteria"
cpp = "::device::AuthenticatorSelectionCriteria"
},
{
mojom = "blink.mojom.PublicKeyCredentialRpEntity"
cpp = "::device::PublicKeyCredentialRpEntity"
},
{
mojom = "blink.mojom.PublicKeyCredentialUserEntity"
cpp = "::device::PublicKeyCredentialUserEntity"
},
{
mojom = "blink.mojom.CableAuthentication"
cpp = "::device::CableDiscoveryData"
},
{
mojom = "blink.mojom.AttestationConveyancePreference"
cpp = "::device::AttestationConveyancePreference"
},
{
mojom = "blink.mojom.LargeBlobSupport"
cpp = "::device::LargeBlobSupport"
},
]
traits_headers =
[ "//content/browser/webauth/authenticator_mojom_traits.h" ]
traits_sources =
[ "//content/browser/webauth/authenticator_mojom_traits.cc" ]
traits_public_deps = [
"//base",
"//device/fido",
]
},
]
blink_cpp_typemaps = [
{
types = [
{
mojom = "blink.mojom.SerializedBlob"
cpp = "::scoped_refptr<::blink::BlobDataHandle>"
nullable_is_same_type = true
},
]
traits_headers = [ "//third_party/blink/renderer/platform/blob/serialized_blob_mojom_traits.h" ]
},
]
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"
# Don't scramble message IDs so they are redistributable to external tests.
scramble_message_ids = false
}
# 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") {
generate_java = true
sources = [
# We can't move these frame/*.mojom files to public/mojom/frame because
# they depend in several .mojom files from the mojo_platform target.
#
# TODO(crbug.com/1078875): Reorganize how we assign frame/*mojom files to
# mojom GN targets to match better the core/platform separation in C++.
"frame/frame.mojom",
"frame/frame_owner_properties.mojom",
"frame/frame_policy.mojom",
"frame/frame_visual_properties.mojom",
"frame/navigation_initiator.mojom",
# transferable_message.mojom depends the other three messaging/ mojom files.
"messaging/cloneable_message.mojom",
"messaging/message_port_descriptor.mojom",
"messaging/transferable_message.mojom",
"messaging/user_activation_snapshot.mojom",
# Depends on transferable_message.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",
# Similarly, shared_worker.mojom and shared_worker_connector.mojom have a
# dependency on message_port_descriptor.mojom, so are put here rather than
# in the mojom_platform target.
"worker/shared_worker.mojom",
"worker/shared_worker_connector.mojom",
# Depends on controller_service_worker.mojom.
"worker/dedicated_worker_host_factory.mojom",
"worker/shared_worker_factory.mojom",
]
public_deps = [
":android_mojo_bindings",
":color_scheme_mojo_bindings",
":mojom_platform",
":script_type_mojo_bindings",
":web_feature_mojo_bindings",
"//cc/mojom",
"//components/payments/mojom",
"//mojo/public/mojom/base",
"//services/network/public/mojom",
"//services/service_manager/public/mojom",
"//services/viz/public/mojom",
"//skia/public/mojom",
"//third_party/blink/public/mojom/service_worker:storage",
"//ui/base/mojom",
"//ui/gfx/geometry/mojom",
"//ui/gfx/range/mojom",
"//url/mojom:url_mojom_gurl",
"//url/mojom:url_mojom_origin",
]
if (is_android) {
# Direct deps (instead of transitive deps) are necessary for java targets.
public_deps += [
"//services/data_decoder/public/mojom:mojom_resource_snapshot_for_web_bundle",
"//services/network/public/mojom:cookies_mojom",
"//services/network/public/mojom:url_loader_base",
"//third_party/blink/public/mojom/frame",
"//third_party/blink/public/mojom/tokens",
"//ui/base/mojom",
"//ui/events/mojom",
]
}
if (is_mac) {
public_deps += [
"//ui/base/mojom",
"//ui/gfx/range/mojom",
]
}
shared_cpp_typemaps = [
{
types = [
{
mojom = "blink.mojom.MessagePortDescriptor"
cpp = "::blink::MessagePortDescriptor"
move_only = true
},
]
traits_headers = [ "//third_party/blink/public/common/messaging/message_port_descriptor_mojom_traits.h" ]
},
]
cpp_typemaps = [
{
types = [
{
mojom = "blink.mojom.CloneableMessage"
cpp = "::blink::CloneableMessage"
move_only = true
},
]
traits_headers =
[ "//third_party/blink/public/common/messaging/cloneable_message.h" ]
traits_private_headers = [ "//third_party/blink/public/common/messaging/cloneable_message_mojom_traits.h" ]
},
{
types = [
{
mojom = "blink.mojom.TransferableMessage"
cpp = "::blink::TransferableMessage"
move_only = true
},
]
traits_headers = [
"//third_party/blink/public/common/messaging/transferable_message.h",
"//third_party/blink/public/common/messaging/message_port_channel.h",
]
traits_private_headers = [ "//third_party/blink/public/common/messaging/transferable_message_mojom_traits.h" ]
},
]
cpp_typemaps += shared_cpp_typemaps
blink_cpp_typemaps = [
{
types = [
{
mojom = "blink.mojom.CloneableMessage"
cpp = "::blink::BlinkCloneableMessage"
move_only = true
},
]
traits_headers = [ "//third_party/blink/renderer/core/messaging/blink_cloneable_message_mojom_traits.h" ]
traits_public_deps = [ "//third_party/blink/public/common" ]
},
{
types = [
{
mojom = "blink.mojom.TransferableMessage"
cpp = "::blink::BlinkTransferableMessage"
move_only = true
},
{
mojom = "blink.mojom.SerializedArrayBufferContents"
cpp = "::blink::ArrayBufferContents"
move_only = true
},
]
traits_headers = [ "//third_party/blink/renderer/core/messaging/blink_transferable_message_mojom_traits.h" ]
traits_public_deps = [
"//third_party/blink/public/common",
"//third_party/blink/renderer/platform/wtf",
]
},
]
blink_cpp_typemaps += shared_cpp_typemaps
overridden_deps_blink = [
":android_mojo_bindings",
":mojom_platform",
"//cc/mojom",
"//services/network/public/mojom",
"//services/viz/public/mojom",
"//third_party/blink/public/mojom/service_worker:storage",
]
component_deps_blink = [
"//cc/mojom",
"//services/viz/public/mojom",
"//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 = [
":android_mojo_bindings",
":mojom_core",
"//mojo/public/mojom/base",
]
overridden_deps_blink = [
":android_mojo_bindings",
":mojom_core",
]
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"
blink_cpp_typemaps = [
{
types = [
{
mojom = "blink.mojom.IDBDatabaseMetadata"
cpp = "::blink::IDBDatabaseMetadata"
},
{
mojom = "blink.mojom.IDBIndexKeys"
cpp = "::blink::IDBIndexKeys"
move_only = true
},
{
mojom = "blink.mojom.IDBIndexMetadata"
cpp = "::scoped_refptr<::blink::IDBIndexMetadata>"
},
{
mojom = "blink.mojom.IDBKey"
cpp = "::std::unique_ptr<::blink::IDBKey>"
move_only = true
},
{
mojom = "blink.mojom.IDBKeyPath"
cpp = "::blink::IDBKeyPath"
},
{
mojom = "blink.mojom.IDBObjectStoreMetadata"
cpp = "::scoped_refptr<::blink::IDBObjectStoreMetadata>"
},
{
mojom = "blink.mojom.IDBValue"
cpp = "::std::unique_ptr<::blink::IDBValue>"
move_only = true
},
]
traits_private_headers = [ "//third_party/blink/renderer/modules/indexeddb/indexed_db_blink_mojom_traits.h" ]
traits_headers = [
"//third_party/blink/public/common/indexeddb/web_idb_types.h",
"//third_party/blink/renderer/modules/indexeddb/idb_key_path.h",
"//third_party/blink/renderer/modules/indexeddb/idb_key_range.h",
"//third_party/blink/renderer/modules/indexeddb/idb_metadata.h",
"//third_party/blink/renderer/modules/indexeddb/idb_name_and_version.h",
"//third_party/blink/renderer/modules/indexeddb/idb_value.h",
]
traits_deps = [ "//third_party/blink/renderer/platform/wtf" ]
},
]
cpp_typemaps = [
{
types = [
{
mojom = "blink.mojom.IDBDatabaseMetadata"
cpp = "::blink::IndexedDBDatabaseMetadata"
},
{
mojom = "blink.mojom.IDBIndexKeys"
cpp = "::blink::IndexedDBIndexKeys"
},
{
mojom = "blink.mojom.IDBIndexMetadata"
cpp = "::blink::IndexedDBIndexMetadata"
},
{
mojom = "blink.mojom.IDBKey"
cpp = "::blink::IndexedDBKey"
},
{
mojom = "blink.mojom.IDBKeyPath"
cpp = "::blink::IndexedDBKeyPath"
},
{
mojom = "blink.mojom.IDBKeyRange"
cpp = "::blink::IndexedDBKeyRange"
},
{
mojom = "blink.mojom.IDBObjectStoreMetadata"
cpp = "::blink::IndexedDBObjectStoreMetadata"
},
]
traits_headers = [
"//third_party/blink/public/common/indexeddb/indexeddb_key.h",
"//third_party/blink/public/common/indexeddb/indexeddb_key_path.h",
"//third_party/blink/public/common/indexeddb/indexeddb_key_range.h",
"//third_party/blink/public/common/indexeddb/indexeddb_metadata.h",
"//third_party/blink/public/common/indexeddb/web_idb_types.h",
]
traits_private_headers = [ "//third_party/blink/public/common/indexeddb/indexed_db_default_mojom_traits.h" ]
},
]
}
mojom("web_bluetooth_mojo_bindings") {
visibility = [
"//third_party/blink/common",
"//third_party/blink/public/common:common",
"//third_party/blink/public/common:headers",
]
visibility_blink = [
"//third_party/blink/common",
"//third_party/blink/public/common:common",
"//third_party/blink/public/common:headers",
"//third_party/blink/renderer/platform:blink_platform_public_deps",
]
sources = [ "bluetooth/web_bluetooth.mojom" ]
public_deps = [ "//device/bluetooth/public/mojom" ]
blink_cpp_typemaps = [
{
types = [
{
mojom = "blink.mojom.WebBluetoothDeviceId"
cpp = "::WTF::String"
},
{
mojom = "bluetooth.mojom.UUID"
cpp = "::WTF::String"
nullable_is_same_type = true
},
]
traits_headers = [
"//third_party/blink/renderer/platform/mojo/bluetooth_mojom_traits.h",
]
traits_public_deps = [ "//device/bluetooth" ]
},
]
cpp_typemaps = [
{
types = [
{
mojom = "blink.mojom.WebBluetoothDeviceId"
cpp = "::blink::WebBluetoothDeviceId"
},
]
traits_headers = [ "//third_party/blink/public/common/bluetooth/web_bluetooth_device_id_mojom_traits.h" ]
},
]
# The chromium variant must be linked with content and use the same export
# settings in component build because of the WebBluetoothDeviceId typemap
# inside content.
export_class_attribute = "BLINK_COMMON_EXPORT"
export_define = "BLINK_COMMON_IMPLEMENTATION=1"
export_header = "third_party/blink/public/common/common_export.h"
# Similarly, the blink variant must be linked with the platform component
# since it uses types from it in its typemaps.
export_class_attribute_blink = "BLINK_PLATFORM_EXPORT"
export_define_blink = "BLINK_PLATFORM_IMPLEMENTATION=1"
export_header_blink = "third_party/blink/public/platform/web_common.h"
}
# The mojom_broadcastchannel_bindings is separated from the rest of mojom files
# to allow blink/renderer/core to depend on this.
mojom("mojom_broadcastchannel_bindings") {
visibility = [ "//content/*" ]
visibility_blink = [ "//third_party/blink/renderer/core/*" ]
sources = [ "broadcastchannel/broadcast_channel.mojom" ]
public_deps = [
":mojom_core",
"//url/mojom:url_mojom_origin",
]
overridden_deps = [ ":mojom_core" ]
component_deps = [ "//third_party/blink/public/common" ]
component_output_prefix = "blink_mojom_broadcastchannel_bindings"
# See comment above.
export_class_attribute = "CONTENT_EXPORT"
export_define = "CONTENT_IMPLEMENTATION=1"
export_header = "content/common/content_export.h"
# Similarly, the blink variant must be linked with the core component
# since it uses types from it in its typemaps.
export_class_attribute_blink = "CORE_EXPORT"
export_define_blink = "BLINK_CORE_IMPLEMENTATION=1"
export_header_blink = "third_party/blink/renderer/core/core_export.h"
}
mojom("mojom_mhtml_load_result") {
generate_java = true
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"
}
mojom_component("script_type_mojo_bindings") {
generate_java = true
sources = [ "script/script_type.mojom" ]
macro_prefix = "SCRIPT_TYPE_MOJOM"
output_prefix = "script_type_mojom"
export_class_attribute_blink = "PLATFORM_EXPORT"
export_define_blink = "BLINK_PLATFORM_IMPLEMENTATION=1"
export_header_blink = "third_party/blink/renderer/platform/platform_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") {
generate_java = true
sources = [
"use_counter/css_property_id.mojom",
"web_feature/web_feature.mojom",
]
macro_prefix = "WEB_FEATURE_MOJO_BINDINGS_MOJOM"
output_prefix = "web_feature_mojo_bindings_mojom"
}
# The embedded_frame_sink_mojo_bindings is separated from the rest of mojom
# files because its deps contain too many files in Chromium that would pollute
# the include paths in generated mojom-blink files for other services.
mojom("embedded_frame_sink_mojo_bindings") {
visibility = [ "//content/*" ]
visibility_blink = [ "//third_party/blink/renderer/platform" ]
sources = [ "frame_sinks/embedded_frame_sink.mojom" ]
deps = [ "//services/viz/public/mojom" ]
component_output_prefix = "blink_embedded_frame_sink_mojo_bindings"
# The chromium variant must be linked with content and use the same export
# settings in component build.
export_class_attribute = "CONTENT_EXPORT"
export_define = "CONTENT_IMPLEMENTATION=1"
export_header = "content/common/content_export.h"
export_class_attribute_blink = "BLINK_PLATFORM_EXPORT"
export_define_blink = "BLINK_PLATFORM_IMPLEMENTATION=1"
export_header_blink = "third_party/blink/public/platform/web_common.h"
}
# This is a separate target because it needs unscrambled message IDs.
mojom("authenticator_test_mojo_bindings") {
generate_java = true
sources = [ "webauthn/virtual_authenticator.mojom" ]
public_deps = [
":android_mojo_bindings",
"//url/mojom:url_mojom_gurl",
]
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"
# Don't scramble message IDs so they are redistributable to external tests.
scramble_message_ids = false
cpp_typemaps = [
{
types = [
{
mojom = "blink.test.mojom.ClientToAuthenticatorProtocol"
cpp = "::device::ProtocolVersion"
},
{
mojom = "blink.test.mojom.Ctap2Version"
cpp = "::device::Ctap2Version"
},
]
traits_headers =
[ "//content/browser/webauth/virtual_authenticator_mojom_traits.h" ]
traits_sources =
[ "//content/browser/webauth/virtual_authenticator_mojom_traits.cc" ]
traits_public_deps = [ "//device/fido" ]
},
]
}
mojom("memory_usage_monitor_linux_mojo_bindings") {
visibility = [
"//content/browser:browser",
"//third_party/blink/renderer/controller:controller",
]
visibility_blink = [ "//third_party/blink/renderer/controller:controller" ]
sources = [ "memory_usage_monitor_linux.mojom" ]
public_deps = [ "//mojo/public/mojom/base" ]
export_class_attribute_blink = "PLATFORM_EXPORT"
export_define_blink = "BLINK_PLATFORM_IMPLEMENTATION=1"
export_header_blink = "third_party/blink/renderer/platform/platform_export.h"
}
mojom("color_scheme_mojo_bindings") {
generate_java = true
visibility_blink = [
"//third_party/blink/public/mojom:mojom_core_blink",
"//third_party/blink/public/mojom:mojom_platform_blink",
"//third_party/blink/renderer/core:prerequisites",
"//third_party/blink/renderer/modules",
"//third_party/blink/renderer/platform",
]
sources = [ "frame/color_scheme.mojom" ]
export_class_attribute = "BLINK_COMMON_EXPORT"
export_define = "BLINK_COMMON_IMPLEMENTATION=1"
export_header = "third_party/blink/public/common/common_export.h"
}
mojom("mobile_metrics") {
sources = [ "mobile_metrics/mobile_friendliness.mojom" ]
cpp_typemaps = [
{
types = [
{
mojom = "blink.mojom.MobileFriendliness"
cpp = "::blink::MobileFriendliness"
},
]
traits_headers = [ "//third_party/blink/common/mobile_metrics/mobile_friendliness_mojom_traits.h" ]
traits_sources = [ "//third_party/blink/common/mobile_metrics/mobile_friendliness_mojom_traits.cc" ]
traits_public_deps = [ "//third_party/blink/public/common:headers" ]
},
]
}