blob: d41ab457f74390709d21815359be2fdc6631113c [file] [log] [blame]
Kinuko Yasudafa0f2512018-03-01 07:13:011# Copyright 2018 The Chromium Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5import("//mojo/public/tools/bindings/mojom.gni")
Julie Jeongeun Kim9912f2e2019-03-01 03:30:186import("//third_party/blink/public/public_features.gni")
Kinuko Yasudafa0f2512018-03-01 07:13:017
8# This target includes all mojom interfaces which can be used from
Chase Phillips4f62c052018-11-06 01:43:519# renderer/platform. In particular these mojom interfaces can't use types that
10# are typemapped to a type in renderer/core.
Kinuko Yasudafa0f2512018-03-01 07:13:0111mojom("mojom_platform") {
12 sources = [
John Delaney74efc1d2018-12-20 18:29:1813 "ad_tagging/ad_frame.mojom",
Julie Jeongeun Kim0abed30c2019-03-04 12:18:2014 "app_banner/app_banner.mojom",
Staphany Park5e0954882019-01-14 20:18:2815 "appcache/appcache.mojom",
16 "appcache/appcache_info.mojom",
Kinuko Yasudafa0f2512018-03-01 07:13:0117 "array_buffer/array_buffer_contents.mojom",
Ken Rockot26e4e802018-07-31 15:03:3318 "associated_interfaces/associated_interfaces.mojom",
Julie Jeongeun Kimdaa631e2019-02-21 14:17:2519 "autoplay/autoplay.mojom",
Richard Li912523f2018-12-13 08:10:4020 "background_fetch/background_fetch.mojom",
Julie Jeongeun Kim781703f2019-03-09 02:49:1021 "background_sync/background_sync.mojom",
Julie Jeongeun Kim78e772b2019-03-08 23:21:5922 "badging/badging.mojom",
Kinuko Yasudafa0f2512018-03-01 07:13:0123 "blob/blob.mojom",
24 "blob/blob_registry.mojom",
25 "blob/blob_url_store.mojom",
26 "blob/data_element.mojom",
27 "blob/serialized_blob.mojom",
Richard Libcc09eb2018-11-30 15:00:3528 "cache_storage/cache_storage.mojom",
Abhijeet Kandalkar849ceff2019-02-28 17:37:2929 "choosers/color_chooser.mojom",
Kent Tamurac260c9a2018-09-14 09:10:5630 "choosers/file_chooser.mojom",
Kinuko Yasudafa0f2512018-03-01 07:13:0131 "clipboard/clipboard.mojom",
Finnur Thorarinsson522d3782018-12-05 02:17:4332 "contacts/contacts_manager.mojom",
Victor Costan7184272a2018-05-15 13:17:4333 "cookie_store/cookie_store.mojom",
Yuzu Saijo2d12ef92018-08-21 04:52:0734 "crash/crash_memory_metrics_reporter.mojom",
Hiroki Nakagawa792fcc32018-12-06 06:50:5735 "csp/content_security_policy.mojom",
Leon Han797b2132019-01-20 12:43:1836 "devtools/console_message.mojom",
Hiroki Nakagawa7c0a7e72018-12-10 04:31:2937 "devtools/devtools_agent.mojom",
Marijn Kruisselbrink4712c332018-06-13 19:06:5938 "dom_storage/session_storage_namespace.mojom",
Marijn Kruisselbrinkf9a9e762018-06-07 18:57:1239 "dom_storage/storage_area.mojom",
Marijn Kruisselbrink4712c332018-06-13 19:06:5940 "dom_storage/storage_partition_service.mojom",
Kinuko Yasudafa0f2512018-03-01 07:13:0141 "feature_policy/feature_policy.mojom",
Richard Lie6899952018-11-30 08:42:0042 "fetch/fetch_api_request.mojom",
Han Leon6bbe7912018-07-31 01:13:4643 "fetch/fetch_api_response.mojom",
Jeremy Roman89a4d0d2018-04-26 19:05:2844 "file/file_utilities.mojom",
Adithya Srinivasan0c72ff02018-08-13 19:47:2945 "filesystem/file_system.mojom",
Marijn Kruisselbrink16af1982018-08-15 21:22:3546 "filesystem/file_writer.mojom",
Oksana Zhuravlova8b88e572019-01-07 21:54:0047 "frame/document_interface_broker.mojom",
Rakina Zata Amniacf40492018-05-08 22:59:3348 "frame/find_in_page.mojom",
Oksana Zhuravlova8b88e572019-01-07 21:54:0049 "frame/frame_host_test_interface.mojom",
Dave Tapuskad6703f912019-01-31 23:13:1150 "frame/lifecycle.mojom",
Andy Paicuc93d30862018-10-10 15:33:4551 "frame/navigation_initiator.mojom",
Julie Jeongeun Kim162c2d282019-03-13 07:23:5252 "geolocation/geolocation_service.mojom",
Julie Jeongeun Kimea2e19a2019-03-13 09:59:4953 "hyphenation/hyphenation.mojom",
Julie Jeongeun Kim41401192019-03-11 13:02:3254 "keyboard_lock/keyboard_lock.mojom",
Dmitry Gozmand016d882018-04-20 01:55:2455 "leak_detector/leak_detector.mojom",
Bill Budge24c1dc1a2018-09-25 18:51:3256 "loader/code_cache.mojom",
Lu Chen5bec7a302018-06-26 18:52:3257 "loader/navigation_predictor.mojom",
Ryan Sturmc65dbe42018-05-31 20:37:0458 "loader/pause_subresource_loading_handle.mojom",
Tarun Bansaldc970292018-07-12 00:02:5859 "loader/previews_resource_loading_hints.mojom",
Hiroki Nakagawa753758342018-12-27 04:13:4960 "loader/url_loader_factory_bundle.mojom",
Julie Jeongeun Kim4a064a92019-03-13 10:17:4561 "locks/lock_manager.mojom",
Dmitry Gozman88ca5a992018-05-18 00:13:3362 "manifest/display_mode.mojom",
63 "manifest/manifest.mojom",
64 "manifest/manifest_manager.mojom",
Guido Urdanetad45f3ed62019-01-16 13:48:1865 "mediastream/media_devices.mojom",
Guido Urdaneta73fa6632019-01-14 18:46:2666 "mediastream/media_stream.mojom",
Julie Jeongeun Kim97410ad2019-02-27 08:04:5167 "mime/mime_registry.mojom",
Kinuko Yasudafa0f2512018-03-01 07:13:0168 "net/ip_address_space.mojom",
Han Leon96d6b6e8c22018-09-06 06:21:0669 "notifications/notification.mojom",
Julie Jeongeun Kim08999f292019-02-27 23:30:4170 "oom_intervention/oom_intervention.mojom",
Becca Hughes6fe54e432018-06-09 04:18:5671 "page/display_cutout.mojom",
Han Leonabbe7c902018-08-30 02:08:1072 "payments/payment_app.mojom",
Julie Jeongeun Kim162c2d282019-03-13 07:23:5273 "permissions/permission.mojom",
74 "permissions/permission_status.mojom",
Mounir Lamouri99ba5a62019-02-12 01:27:4775 "picture_in_picture/picture_in_picture.mojom",
Jeremy Romanb7024742018-06-18 22:00:2276 "plugins/plugin_registry.mojom",
mark a. foltz6bbe59f2018-07-24 20:06:2477 "presentation/presentation.mojom",
Kinuko Yasudafa0f2512018-03-01 07:13:0178 "quota/quota_dispatcher_host.mojom",
79 "quota/quota_types.mojom",
Leon Han075e0b32018-11-06 07:59:4480 "referrer.mojom",
Leon Hanf4003a162019-01-28 05:31:5881 "renderer_preference_watcher.mojom",
Leon Hanc819dc62019-01-28 04:30:1982 "renderer_preferences.mojom",
Julie Jeongeun Kim9912f2e2019-03-01 03:30:1883 "reporting/reporting.mojom",
Hiroki Nakagawa4b072c62018-11-07 03:57:2584 "script/script_type.mojom",
Reilly Grante4f46642019-03-04 22:41:5985 "serial/serial.mojom",
Han Leon122d28182018-06-26 07:56:5586 "service_worker/dispatch_fetch_event_params.mojom",
Kinuko Yasudafa0f2512018-03-01 07:13:0187 "service_worker/navigation_preload_state.mojom",
Kinuko Yasudafa0f2512018-03-01 07:13:0188 "service_worker/service_worker_client.mojom",
89 "service_worker/service_worker_error_type.mojom",
90 "service_worker/service_worker_event_status.mojom",
Han Leon9a3a2fb2018-08-07 02:56:0191 "service_worker/service_worker_fetch_response_callback.mojom",
Kinuko Yasudafa0f2512018-03-01 07:13:0192 "service_worker/service_worker_installed_scripts_manager.mojom",
Kinuko Yasudafa0f2512018-03-01 07:13:0193 "service_worker/service_worker_provider_type.mojom",
Kinuko Yasudafa0f2512018-03-01 07:13:0194 "service_worker/service_worker_state.mojom",
95 "service_worker/service_worker_stream_handle.mojom",
Julie Jeongeun Kim9912f2e2019-03-01 03:30:1896 "site_engagement/site_engagement.mojom",
Adithya Srinivasanc35bf3962018-06-12 14:28:1497 "speech/speech_recognition_error.mojom",
98 "speech/speech_recognition_grammar.mojom",
99 "speech/speech_recognition_result.mojom",
100 "speech/speech_recognizer.mojom",
Julie Jeongeun Kim9912f2e2019-03-01 03:30:18101 "ukm/ukm.mojom",
Luna Lu29d922d2018-03-27 18:06:51102 "use_counter/css_property_id.mojom",
Mike West6e4cbb32019-02-13 09:40:17103 "user_agent/user_agent_metadata.mojom",
Leon Hancaae6db2019-02-03 03:37:54104 "v8_cache_options.mojom",
Mounir Lamouri54c31f52018-12-09 02:52:54105 "wake_lock/wake_lock.mojom",
Raymond Toye413650c2018-08-31 00:12:47106 "webaudio/audio_context_manager.mojom",
Hiroki Nakagawa2da3b582018-12-10 06:44:52107 "worker/shared_worker.mojom",
Hiroki Nakagawad0dee832018-12-04 11:19:10108 "worker/shared_worker_client.mojom",
Hiroki Nakagawa0e677762018-12-06 14:55:38109 "worker/shared_worker_connector.mojom",
Hiroki Nakagawa32376a52018-12-03 10:49:23110 "worker/shared_worker_creation_context_type.mojom",
Hiroki Nakagawa86d9e0e2018-12-06 10:55:00111 "worker/shared_worker_host.mojom",
Hiroki Nakagawa1f236df2018-12-06 06:55:27112 "worker/shared_worker_info.mojom",
Leon Han6ac123d2019-01-17 07:52:25113 "worker/worker_content_settings_proxy.mojom",
Hiroki Nakagawa32376a52018-12-03 10:49:23114 "worker/worker_main_script_load_params.mojom",
Kinuko Yasudafa0f2512018-03-01 07:13:01115 ]
116
Dominik Röttsches24f9d162019-01-04 10:43:56117 if (is_win) {
118 sources += [ "dwrite_font_proxy/dwrite_font_proxy.mojom" ]
119 }
120
Kinuko Yasudafa0f2512018-03-01 07:13:01121 public_deps = [
Han Leonabbe7c902018-08-30 02:08:10122 ":android_mojo_bindings",
Ian Wellscbc4e6f2019-02-07 22:07:57123 ":mojom_mhtml_load_result",
Adithya Srinivasanc35bf3962018-06-12 14:28:14124 ":speech_recognition_error_code",
Julie Jeongeun Kim573ba3d2019-03-01 11:35:22125 ":web_client_hints_types_mojo_bindings",
Julie Jeongeun Kim184d78a62019-03-01 02:10:15126 ":web_feature_mojo_bindings",
Han Leonabbe7c902018-08-30 02:08:10127 "//components/payments/mojom",
Adithya Srinivasan0c72ff02018-08-13 19:47:29128 "//components/services/filesystem/public/interfaces",
Oksana Zhuravlova015487b32018-03-09 06:58:22129 "//mojo/public/mojom/base",
Dmitry Gozman88ca5a992018-05-18 00:13:33130 "//services/device/public/mojom",
Kinuko Yasudafa0f2512018-03-01 07:13:01131 "//services/network/public/mojom",
Hiroki Nakagawac30b9f02018-12-03 11:26:01132 "//services/service_manager/public/mojom",
Mounir Lamouri99ba5a62019-02-12 01:27:47133 "//services/viz/public/interfaces",
Mike Wasserman384f907d2018-06-01 01:50:56134 "//skia/public/interfaces",
Donna Wu838ac362018-08-10 10:36:33135 "//third_party/blink/public/mojom/usb",
Kinuko Yasudafa0f2512018-03-01 07:13:01136 "//ui/gfx/geometry/mojo",
Leon Hanc819dc62019-01-28 04:30:19137 "//ui/gfx/mojo",
Kinuko Yasudafa0f2512018-03-01 07:13:01138 "//url/mojom:url_mojom_gurl",
139 "//url/mojom:url_mojom_origin",
140 ]
141
Guido Urdaneta73fa6632019-01-14 18:46:26142 # iOS doesn't use and must not depend on //media
143 if (!is_ios) {
144 public_deps += [
145 "//media/capture/mojom:video_capture",
146 "//media/mojo/interfaces",
147 ]
148 }
149
Leon Hanc819dc62019-01-28 04:30:19150 if (is_linux || is_chromeos) {
151 enabled_features = [ "renderer_pref_system_font_family_name" ]
152 }
153
Kinuko Yasudafa0f2512018-03-01 07:13:01154 export_class_attribute = "BLINK_COMMON_EXPORT"
155 export_define = "BLINK_COMMON_IMPLEMENTATION=1"
Daniel Bratell54449102018-10-29 22:21:43156 export_header = "third_party/blink/public/common/common_export.h"
Kinuko Yasudafa0f2512018-03-01 07:13:01157
158 export_class_attribute_blink = "PLATFORM_EXPORT"
159 export_define_blink = "BLINK_PLATFORM_IMPLEMENTATION=1"
Blink Reformata30d4232018-04-07 15:31:06160 export_header_blink = "third_party/blink/renderer/platform/platform_export.h"
Kinuko Yasudafa0f2512018-03-01 07:13:01161}
162
Han Leonabbe7c902018-08-30 02:08:10163# Kept separate from "mojom_platform" because the Java bindings are specifically
164# needed by Android's implementation of payments
Julie Jeongeun Kim7de77e92019-02-27 00:14:15165# (in components/payments/content/android and chrome/android/)
166# and input (in android_webview/ and content/browser/android/).
Han Leonabbe7c902018-08-30 02:08:10167mojom("android_mojo_bindings") {
168 sources = [
Julie Jeongeun Kim7de77e92019-02-27 00:14:15169 "input/input_host.mojom",
170 "input/input_messages.mojom",
Han Leonabbe7c902018-08-30 02:08:10171 "payments/payment_request.mojom",
172 ]
173 public_deps = [
174 "//components/payments/mojom",
175 ]
176
Julie Jeongeun Kim9912f2e2019-03-01 03:30:18177 # This Android unhandled-tap feature uses another mojo source, add it in.
178 if (enable_unhandled_tap) {
179 sources += [ "unhandled_tap_notifier/unhandled_tap_notifier.mojom" ]
180 public_deps += [ "//ui/gfx/geometry/mojo" ]
181 }
182
Han Leonabbe7c902018-08-30 02:08:10183 export_class_attribute = "BLINK_COMMON_EXPORT"
184 export_define = "BLINK_COMMON_IMPLEMENTATION=1"
Daniel Bratell54449102018-10-29 22:21:43185 export_header = "third_party/blink/public/common/common_export.h"
Han Leonabbe7c902018-08-30 02:08:10186
187 export_class_attribute_blink = "PLATFORM_EXPORT"
188 export_define_blink = "BLINK_PLATFORM_IMPLEMENTATION=1"
189 export_header_blink = "third_party/blink/renderer/platform/platform_export.h"
190}
191
Adithya Srinivasanc35bf3962018-06-12 14:28:14192# Kept separate from "mojom_platform" because the Java bindings are needed by
193# Android's implementation of speech recognition.
Takuto Ikuta55f5c1372019-01-24 05:37:28194mojom_component("speech_recognition_error_code") {
Adithya Srinivasanc35bf3962018-06-12 14:28:14195 sources = [
196 "speech/speech_recognition_error_code.mojom",
197 ]
Takuto Ikuta55f5c1372019-01-24 05:37:28198
199 macro_prefix = "SPEECH_RECOGNITION_ERROR_CODE_MOJOM"
200 output_prefix = "speech_recognition_error_code_mojom"
Adithya Srinivasanc35bf3962018-06-12 14:28:14201}
202
Kinuko Yasudafa0f2512018-03-01 07:13:01203# This target can include mojom interfaces which do use types that are
Chase Phillips4f62c052018-11-06 01:43:51204# typemapped to a type in renderer/core. This also means these interfaces are
205# not available from renderer/platform.
Hiroki Nakagawa9144ec862019-01-28 10:12:44206#
Han Leonb2f46cd2018-03-09 01:59:16207# In future we may have a separate mojom target for the things that may have
208# modules dependencies if it looks necessary, at that time we can put all of
209# those high-level service worker mojom files there.
Han Leon19420c72018-03-08 01:59:55210mojom("mojom_core") {
Kinuko Yasudafa0f2512018-03-01 07:13:01211 sources = [
Zhuoyu Qianb647e772018-09-19 04:04:47212 "messaging/cloneable_message.mojom",
213 "messaging/transferable_message.mojom",
Zhuoyu Qian47ed0fc52018-09-06 02:13:40214 "messaging/user_activation_snapshot.mojom",
Lucas Furukawa Gadani72655072018-07-26 22:34:33215 "portal/portal.mojom",
Hiroki Nakagawa9144ec862019-01-28 10:12:44216
217 # Note that service_worker_object.mojom and service_worker.mojom depend on
218 # transferable_message.mojom, and controller_service_worker.mojom and
219 # service_worker_registration.mojom depend on service_worker_object.mojom,
220 # so we put these service worker mojom files here rather than mojom_platform
221 # target.
Hiroki Nakagawacdbc7912018-11-30 11:30:05222 "service_worker/controller_service_worker.mojom",
Leon Han6e7c6e2f2019-02-03 07:26:56223 "service_worker/embedded_worker.mojom",
Han Leon94335e42018-03-15 08:44:18224 "service_worker/service_worker.mojom",
Richard Li743a69f2018-12-21 06:44:56225 "service_worker/service_worker_container.mojom",
Han Leonb2f46cd2018-03-09 01:59:16226 "service_worker/service_worker_object.mojom",
Richard Li32fb39202018-12-21 06:49:41227 "service_worker/service_worker_provider.mojom",
Han Leonb2f46cd2018-03-09 01:59:16228 "service_worker/service_worker_registration.mojom",
Hiroki Nakagawa9144ec862019-01-28 10:12:44229
230 # Depends on controller_service_worker.mojom.
Hiroki Nakagawa3d14c4f2019-02-09 01:27:30231 "worker/dedicated_worker_host_factory.mojom",
Hiroki Nakagawa9144ec862019-01-28 10:12:44232 "worker/shared_worker_factory.mojom",
Kinuko Yasudafa0f2512018-03-01 07:13:01233 ]
234
235 public_deps = [
236 ":mojom_platform",
Julie Jeongeun Kim184d78a62019-03-01 02:10:15237 ":web_feature_mojo_bindings",
Richard Li99e67742018-12-20 05:28:13238 "//components/payments/mojom",
Ken Rockot1ca39312018-04-12 05:32:55239 "//mojo/public/mojom/base",
Richard Li99e67742018-12-20 05:28:13240 "//services/network/public/mojom",
Richard Li32fb39202018-12-21 06:49:41241 "//services/service_manager/public/mojom",
Kinuko Yasudafa0f2512018-03-01 07:13:01242 "//skia/public/interfaces",
Han Leonb2f46cd2018-03-09 01:59:16243 "//url/mojom:url_mojom_gurl",
Richard Li99e67742018-12-20 05:28:13244 "//url/mojom:url_mojom_origin",
Kinuko Yasudafa0f2512018-03-01 07:13:01245 ]
246
Richard Li99e67742018-12-20 05:28:13247 overridden_deps_blink = [
248 ":mojom_platform",
249 "//services/network/public/mojom",
250 ]
Blink Reformata30d4232018-04-07 15:31:06251 component_deps_blink = [ "//third_party/blink/renderer/platform" ]
Kinuko Yasudafa0f2512018-03-01 07:13:01252
253 export_class_attribute = "BLINK_COMMON_EXPORT"
254 export_define = "BLINK_COMMON_IMPLEMENTATION=1"
Daniel Bratell54449102018-10-29 22:21:43255 export_header = "third_party/blink/public/common/common_export.h"
Kinuko Yasudafa0f2512018-03-01 07:13:01256
257 export_class_attribute_blink = "CORE_EXPORT"
258 export_define_blink = "BLINK_CORE_IMPLEMENTATION=1"
Blink Reformata30d4232018-04-07 15:31:06259 export_header_blink = "third_party/blink/renderer/core/core_export.h"
Kinuko Yasudafa0f2512018-03-01 07:13:01260}
Chase Phillips4f62c052018-11-06 01:43:51261
262# This target can include mojom interfaces which use types that are typemapped
263# to a type in renderer/modules. This also means these interfaces are not
264# available from renderer/platform or renderer/core.
265mojom("mojom_modules") {
266 sources = [
267 "indexeddb/indexeddb.mojom",
268 ]
269
270 public_deps = [
271 ":mojom_core",
272
273 # TODO(https://crbug.com/822804): Remove when mojom bindings deps checks
274 # get fixed.
275 ":mojom_platform",
276 "//mojo/public/mojom/base",
277 "//skia/public/interfaces",
278 "//url/mojom:url_mojom_gurl",
279 "//url/mojom:url_mojom_origin",
280 ]
281
282 overridden_deps_blink = [
283 ":mojom_core",
284 ":mojom_platform",
285 ]
286 component_deps_blink = [ "//third_party/blink/renderer/core" ]
287
288 export_class_attribute = "BLINK_COMMON_EXPORT"
289 export_define = "BLINK_COMMON_IMPLEMENTATION=1"
290 export_header = "third_party/blink/public/common/common_export.h"
291
292 export_class_attribute_blink = "MODULES_EXPORT"
293 export_define_blink = "BLINK_MODULES_IMPLEMENTATION=1"
294 export_header_blink = "third_party/blink/renderer/modules/modules_export.h"
295}
Ian Wellscbc4e6f2019-02-07 22:07:57296
297mojom("mojom_mhtml_load_result") {
298 sources = [
299 "loader/mhtml_load_result.mojom",
300 ]
301
302 export_class_attribute = "BLINK_COMMON_EXPORT"
303 export_define = "BLINK_COMMON_IMPLEMENTATION=1"
304 export_header = "third_party/blink/public/common/common_export.h"
305}
Julie Jeongeun Kim184d78a62019-03-01 02:10:15306
307# The web_feature_mojo_bindings is separated from the rest of the mojom files
308# because the chromium typemap for blink mojo_bindings has private content
309# dependencies.
310mojom_component("web_feature_mojo_bindings") {
311 sources = [
312 "web_feature/web_feature.mojom",
313 ]
314
315 macro_prefix = "WEB_FEATURE_MOJO_BINDINGS_MOJOM"
316 output_prefix = "web_feature_mojo_bindings_mojom"
317}
Julie Jeongeun Kim573ba3d2019-03-01 11:35:22318
319# The web_client_hints_types_mojo_bindings is separated from the rest of the
320# mojom files because the chromium typemap for blink mojo_bindings has private
321# content dependencies.
322mojom("web_client_hints_types_mojo_bindings") {
323 sources = [
324 "web_client_hints/web_client_hints_types.mojom",
325 ]
326}