blob: 991bcfeffa96d95b332b9aeedf7e299c51e2a754 [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",
Oksana Zhuravlova424f33e2019-03-18 20:53:2135 "credentialmanager/credential_manager.mojom",
Hiroki Nakagawa792fcc32018-12-06 06:50:5736 "csp/content_security_policy.mojom",
Leon Han797b2132019-01-20 12:43:1837 "devtools/console_message.mojom",
Hiroki Nakagawa7c0a7e72018-12-10 04:31:2938 "devtools/devtools_agent.mojom",
Marijn Kruisselbrink4712c332018-06-13 19:06:5939 "dom_storage/session_storage_namespace.mojom",
Marijn Kruisselbrinkf9a9e762018-06-07 18:57:1240 "dom_storage/storage_area.mojom",
Marijn Kruisselbrink4712c332018-06-13 19:06:5941 "dom_storage/storage_partition_service.mojom",
Kinuko Yasudafa0f2512018-03-01 07:13:0142 "feature_policy/feature_policy.mojom",
Richard Lie6899952018-11-30 08:42:0043 "fetch/fetch_api_request.mojom",
Han Leon6bbe7912018-07-31 01:13:4644 "fetch/fetch_api_response.mojom",
Jeremy Roman89a4d0d2018-04-26 19:05:2845 "file/file_utilities.mojom",
Adithya Srinivasan0c72ff02018-08-13 19:47:2946 "filesystem/file_system.mojom",
Marijn Kruisselbrink16af1982018-08-15 21:22:3547 "filesystem/file_writer.mojom",
Oksana Zhuravlova8b88e572019-01-07 21:54:0048 "frame/document_interface_broker.mojom",
Rakina Zata Amniacf40492018-05-08 22:59:3349 "frame/find_in_page.mojom",
Oksana Zhuravlova8b88e572019-01-07 21:54:0050 "frame/frame_host_test_interface.mojom",
Dave Tapuskad6703f912019-01-31 23:13:1151 "frame/lifecycle.mojom",
Andy Paicuc93d30862018-10-10 15:33:4552 "frame/navigation_initiator.mojom",
Julie Jeongeun Kim162c2d282019-03-13 07:23:5253 "geolocation/geolocation_service.mojom",
Julie Jeongeun Kimea2e19a2019-03-13 09:59:4954 "hyphenation/hyphenation.mojom",
Julie Jeongeun Kim0cecf4b2019-03-13 11:52:3555 "insecure_input/insecure_input_service.mojom",
Julie Jeongeun Kim41401192019-03-11 13:02:3256 "keyboard_lock/keyboard_lock.mojom",
Dmitry Gozmand016d882018-04-20 01:55:2457 "leak_detector/leak_detector.mojom",
Bill Budge24c1dc1a2018-09-25 18:51:3258 "loader/code_cache.mojom",
Lu Chen5bec7a302018-06-26 18:52:3259 "loader/navigation_predictor.mojom",
Ryan Sturmc65dbe42018-05-31 20:37:0460 "loader/pause_subresource_loading_handle.mojom",
Tarun Bansaldc970292018-07-12 00:02:5861 "loader/previews_resource_loading_hints.mojom",
Hiroki Nakagawa753758342018-12-27 04:13:4962 "loader/url_loader_factory_bundle.mojom",
Julie Jeongeun Kim4a064a92019-03-13 10:17:4563 "locks/lock_manager.mojom",
Dmitry Gozman88ca5a992018-05-18 00:13:3364 "manifest/display_mode.mojom",
65 "manifest/manifest.mojom",
66 "manifest/manifest_manager.mojom",
Guido Urdanetad45f3ed62019-01-16 13:48:1867 "mediastream/media_devices.mojom",
Guido Urdaneta73fa6632019-01-14 18:46:2668 "mediastream/media_stream.mojom",
Julie Jeongeun Kim97410ad2019-02-27 08:04:5169 "mime/mime_registry.mojom",
Kinuko Yasudafa0f2512018-03-01 07:13:0170 "net/ip_address_space.mojom",
Han Leon96d6b6e8c22018-09-06 06:21:0671 "notifications/notification.mojom",
Julie Jeongeun Kim08999f292019-02-27 23:30:4172 "oom_intervention/oom_intervention.mojom",
Becca Hughes6fe54e432018-06-09 04:18:5673 "page/display_cutout.mojom",
Han Leonabbe7c902018-08-30 02:08:1074 "payments/payment_app.mojom",
Julie Jeongeun Kim162c2d282019-03-13 07:23:5275 "permissions/permission.mojom",
76 "permissions/permission_status.mojom",
Mounir Lamouri99ba5a62019-02-12 01:27:4777 "picture_in_picture/picture_in_picture.mojom",
Jeremy Romanb7024742018-06-18 22:00:2278 "plugins/plugin_registry.mojom",
mark a. foltz6bbe59f2018-07-24 20:06:2479 "presentation/presentation.mojom",
Kinuko Yasudafa0f2512018-03-01 07:13:0180 "quota/quota_dispatcher_host.mojom",
81 "quota/quota_types.mojom",
Leon Han075e0b32018-11-06 07:59:4482 "referrer.mojom",
Leon Hanf4003a162019-01-28 05:31:5883 "renderer_preference_watcher.mojom",
Leon Hanc819dc62019-01-28 04:30:1984 "renderer_preferences.mojom",
Julie Jeongeun Kim9912f2e2019-03-01 03:30:1885 "reporting/reporting.mojom",
Hiroki Nakagawa4b072c62018-11-07 03:57:2586 "script/script_type.mojom",
Han Leon122d28182018-06-26 07:56:5587 "service_worker/dispatch_fetch_event_params.mojom",
Kinuko Yasudafa0f2512018-03-01 07:13:0188 "service_worker/navigation_preload_state.mojom",
Kinuko Yasudafa0f2512018-03-01 07:13:0189 "service_worker/service_worker_client.mojom",
90 "service_worker/service_worker_error_type.mojom",
91 "service_worker/service_worker_event_status.mojom",
Han Leon9a3a2fb2018-08-07 02:56:0192 "service_worker/service_worker_fetch_response_callback.mojom",
Kinuko Yasudafa0f2512018-03-01 07:13:0193 "service_worker/service_worker_installed_scripts_manager.mojom",
Kinuko Yasudafa0f2512018-03-01 07:13:0194 "service_worker/service_worker_provider_type.mojom",
Kinuko Yasudafa0f2512018-03-01 07:13:0195 "service_worker/service_worker_state.mojom",
96 "service_worker/service_worker_stream_handle.mojom",
Julie Jeongeun Kim9912f2e2019-03-01 03:30:1897 "site_engagement/site_engagement.mojom",
Adithya Srinivasanc35bf3962018-06-12 14:28:1498 "speech/speech_recognition_error.mojom",
99 "speech/speech_recognition_grammar.mojom",
100 "speech/speech_recognition_result.mojom",
101 "speech/speech_recognizer.mojom",
Julie Jeongeun Kim9912f2e2019-03-01 03:30:18102 "ukm/ukm.mojom",
Luna Lu29d922d2018-03-27 18:06:51103 "use_counter/css_property_id.mojom",
Mike West6e4cbb32019-02-13 09:40:17104 "user_agent/user_agent_metadata.mojom",
Leon Hancaae6db2019-02-03 03:37:54105 "v8_cache_options.mojom",
Mounir Lamouri54c31f52018-12-09 02:52:54106 "wake_lock/wake_lock.mojom",
Raymond Toye413650c2018-08-31 00:12:47107 "webaudio/audio_context_manager.mojom",
Hiroki Nakagawa2da3b582018-12-10 06:44:52108 "worker/shared_worker.mojom",
Hiroki Nakagawad0dee832018-12-04 11:19:10109 "worker/shared_worker_client.mojom",
Hiroki Nakagawa0e677762018-12-06 14:55:38110 "worker/shared_worker_connector.mojom",
Hiroki Nakagawa32376a52018-12-03 10:49:23111 "worker/shared_worker_creation_context_type.mojom",
Hiroki Nakagawa86d9e0e2018-12-06 10:55:00112 "worker/shared_worker_host.mojom",
Hiroki Nakagawa1f236df2018-12-06 06:55:27113 "worker/shared_worker_info.mojom",
Leon Han6ac123d2019-01-17 07:52:25114 "worker/worker_content_settings_proxy.mojom",
Hiroki Nakagawa32376a52018-12-03 10:49:23115 "worker/worker_main_script_load_params.mojom",
Kinuko Yasudafa0f2512018-03-01 07:13:01116 ]
117
Reilly Grant2814fb72019-03-19 17:04:46118 if (!is_android) {
119 sources += [ "serial/serial.mojom" ]
120 }
121
Dominik Röttsches24f9d162019-01-04 10:43:56122 if (is_win) {
123 sources += [ "dwrite_font_proxy/dwrite_font_proxy.mojom" ]
124 }
125
Kinuko Yasudafa0f2512018-03-01 07:13:01126 public_deps = [
Han Leonabbe7c902018-08-30 02:08:10127 ":android_mojo_bindings",
Ian Wellscbc4e6f2019-02-07 22:07:57128 ":mojom_mhtml_load_result",
Adithya Srinivasanc35bf3962018-06-12 14:28:14129 ":speech_recognition_error_code",
Julie Jeongeun Kim573ba3d2019-03-01 11:35:22130 ":web_client_hints_types_mojo_bindings",
Julie Jeongeun Kim184d78a62019-03-01 02:10:15131 ":web_feature_mojo_bindings",
Han Leonabbe7c902018-08-30 02:08:10132 "//components/payments/mojom",
Adithya Srinivasan0c72ff02018-08-13 19:47:29133 "//components/services/filesystem/public/interfaces",
Oksana Zhuravlova015487b32018-03-09 06:58:22134 "//mojo/public/mojom/base",
Dmitry Gozman88ca5a992018-05-18 00:13:33135 "//services/device/public/mojom",
Kinuko Yasudafa0f2512018-03-01 07:13:01136 "//services/network/public/mojom",
Hiroki Nakagawac30b9f02018-12-03 11:26:01137 "//services/service_manager/public/mojom",
Mounir Lamouri99ba5a62019-02-12 01:27:47138 "//services/viz/public/interfaces",
Mike Wasserman384f907d2018-06-01 01:50:56139 "//skia/public/interfaces",
Donna Wu838ac362018-08-10 10:36:33140 "//third_party/blink/public/mojom/usb",
Kinuko Yasudafa0f2512018-03-01 07:13:01141 "//ui/gfx/geometry/mojo",
Leon Hanc819dc62019-01-28 04:30:19142 "//ui/gfx/mojo",
Kinuko Yasudafa0f2512018-03-01 07:13:01143 "//url/mojom:url_mojom_gurl",
144 "//url/mojom:url_mojom_origin",
145 ]
146
Guido Urdaneta73fa6632019-01-14 18:46:26147 # iOS doesn't use and must not depend on //media
148 if (!is_ios) {
149 public_deps += [
150 "//media/capture/mojom:video_capture",
151 "//media/mojo/interfaces",
152 ]
153 }
154
Leon Hanc819dc62019-01-28 04:30:19155 if (is_linux || is_chromeos) {
156 enabled_features = [ "renderer_pref_system_font_family_name" ]
157 }
158
Kinuko Yasudafa0f2512018-03-01 07:13:01159 export_class_attribute = "BLINK_COMMON_EXPORT"
160 export_define = "BLINK_COMMON_IMPLEMENTATION=1"
Daniel Bratell54449102018-10-29 22:21:43161 export_header = "third_party/blink/public/common/common_export.h"
Kinuko Yasudafa0f2512018-03-01 07:13:01162
163 export_class_attribute_blink = "PLATFORM_EXPORT"
164 export_define_blink = "BLINK_PLATFORM_IMPLEMENTATION=1"
Blink Reformata30d4232018-04-07 15:31:06165 export_header_blink = "third_party/blink/renderer/platform/platform_export.h"
Kinuko Yasudafa0f2512018-03-01 07:13:01166}
167
Han Leonabbe7c902018-08-30 02:08:10168# Kept separate from "mojom_platform" because the Java bindings are specifically
Eric Willigers3eeae17c2019-03-13 17:32:10169# needed by Android's implementation of payments and webshare
Findite01649612019-03-16 04:48:55170# (in components/payments/content/android and chrome/android/)
171# and input (in android_webview/ and content/browser/android/).
Han Leonabbe7c902018-08-30 02:08:10172mojom("android_mojo_bindings") {
173 sources = [
Julie Jeongeun Kim7de77e92019-02-27 00:14:15174 "input/input_host.mojom",
175 "input/input_messages.mojom",
Han Leonabbe7c902018-08-30 02:08:10176 "payments/payment_request.mojom",
Eric Willigers3eeae17c2019-03-13 17:32:10177 "webshare/webshare.mojom",
Han Leonabbe7c902018-08-30 02:08:10178 ]
179 public_deps = [
180 "//components/payments/mojom",
Eric Willigers3eeae17c2019-03-13 17:32:10181 "//url/mojom:url_mojom_gurl",
182 "//url/mojom:url_mojom_origin",
Han Leonabbe7c902018-08-30 02:08:10183 ]
184
Julie Jeongeun Kim9912f2e2019-03-01 03:30:18185 # This Android unhandled-tap feature uses another mojo source, add it in.
186 if (enable_unhandled_tap) {
187 sources += [ "unhandled_tap_notifier/unhandled_tap_notifier.mojom" ]
188 public_deps += [ "//ui/gfx/geometry/mojo" ]
189 }
190
Han Leonabbe7c902018-08-30 02:08:10191 export_class_attribute = "BLINK_COMMON_EXPORT"
192 export_define = "BLINK_COMMON_IMPLEMENTATION=1"
Daniel Bratell54449102018-10-29 22:21:43193 export_header = "third_party/blink/public/common/common_export.h"
Han Leonabbe7c902018-08-30 02:08:10194
195 export_class_attribute_blink = "PLATFORM_EXPORT"
196 export_define_blink = "BLINK_PLATFORM_IMPLEMENTATION=1"
197 export_header_blink = "third_party/blink/renderer/platform/platform_export.h"
198}
199
Adithya Srinivasanc35bf3962018-06-12 14:28:14200# Kept separate from "mojom_platform" because the Java bindings are needed by
201# Android's implementation of speech recognition.
Takuto Ikuta55f5c1372019-01-24 05:37:28202mojom_component("speech_recognition_error_code") {
Adithya Srinivasanc35bf3962018-06-12 14:28:14203 sources = [
204 "speech/speech_recognition_error_code.mojom",
205 ]
Takuto Ikuta55f5c1372019-01-24 05:37:28206
207 macro_prefix = "SPEECH_RECOGNITION_ERROR_CODE_MOJOM"
208 output_prefix = "speech_recognition_error_code_mojom"
Adithya Srinivasanc35bf3962018-06-12 14:28:14209}
210
Kinuko Yasudafa0f2512018-03-01 07:13:01211# This target can include mojom interfaces which do use types that are
Chase Phillips4f62c052018-11-06 01:43:51212# typemapped to a type in renderer/core. This also means these interfaces are
213# not available from renderer/platform.
Hiroki Nakagawa9144ec862019-01-28 10:12:44214#
Han Leonb2f46cd2018-03-09 01:59:16215# In future we may have a separate mojom target for the things that may have
216# modules dependencies if it looks necessary, at that time we can put all of
217# those high-level service worker mojom files there.
Han Leon19420c72018-03-08 01:59:55218mojom("mojom_core") {
Kinuko Yasudafa0f2512018-03-01 07:13:01219 sources = [
Zhuoyu Qianb647e772018-09-19 04:04:47220 "messaging/cloneable_message.mojom",
221 "messaging/transferable_message.mojom",
Zhuoyu Qian47ed0fc52018-09-06 02:13:40222 "messaging/user_activation_snapshot.mojom",
Lucas Furukawa Gadani72655072018-07-26 22:34:33223 "portal/portal.mojom",
Hiroki Nakagawa9144ec862019-01-28 10:12:44224
225 # Note that service_worker_object.mojom and service_worker.mojom depend on
226 # transferable_message.mojom, and controller_service_worker.mojom and
227 # service_worker_registration.mojom depend on service_worker_object.mojom,
228 # so we put these service worker mojom files here rather than mojom_platform
229 # target.
Hiroki Nakagawacdbc7912018-11-30 11:30:05230 "service_worker/controller_service_worker.mojom",
Leon Han6e7c6e2f2019-02-03 07:26:56231 "service_worker/embedded_worker.mojom",
Han Leon94335e42018-03-15 08:44:18232 "service_worker/service_worker.mojom",
Richard Li743a69f2018-12-21 06:44:56233 "service_worker/service_worker_container.mojom",
Han Leonb2f46cd2018-03-09 01:59:16234 "service_worker/service_worker_object.mojom",
Richard Li32fb39202018-12-21 06:49:41235 "service_worker/service_worker_provider.mojom",
Han Leonb2f46cd2018-03-09 01:59:16236 "service_worker/service_worker_registration.mojom",
Hiroki Nakagawa9144ec862019-01-28 10:12:44237
238 # Depends on controller_service_worker.mojom.
Hiroki Nakagawa3d14c4f2019-02-09 01:27:30239 "worker/dedicated_worker_host_factory.mojom",
Hiroki Nakagawa9144ec862019-01-28 10:12:44240 "worker/shared_worker_factory.mojom",
Kinuko Yasudafa0f2512018-03-01 07:13:01241 ]
242
243 public_deps = [
244 ":mojom_platform",
Julie Jeongeun Kim184d78a62019-03-01 02:10:15245 ":web_feature_mojo_bindings",
Richard Li99e67742018-12-20 05:28:13246 "//components/payments/mojom",
Ken Rockot1ca39312018-04-12 05:32:55247 "//mojo/public/mojom/base",
Richard Li99e67742018-12-20 05:28:13248 "//services/network/public/mojom",
Richard Li32fb39202018-12-21 06:49:41249 "//services/service_manager/public/mojom",
Kinuko Yasudafa0f2512018-03-01 07:13:01250 "//skia/public/interfaces",
Han Leonb2f46cd2018-03-09 01:59:16251 "//url/mojom:url_mojom_gurl",
Richard Li99e67742018-12-20 05:28:13252 "//url/mojom:url_mojom_origin",
Kinuko Yasudafa0f2512018-03-01 07:13:01253 ]
254
Richard Li99e67742018-12-20 05:28:13255 overridden_deps_blink = [
256 ":mojom_platform",
257 "//services/network/public/mojom",
258 ]
Blink Reformata30d4232018-04-07 15:31:06259 component_deps_blink = [ "//third_party/blink/renderer/platform" ]
Kinuko Yasudafa0f2512018-03-01 07:13:01260
261 export_class_attribute = "BLINK_COMMON_EXPORT"
262 export_define = "BLINK_COMMON_IMPLEMENTATION=1"
Daniel Bratell54449102018-10-29 22:21:43263 export_header = "third_party/blink/public/common/common_export.h"
Kinuko Yasudafa0f2512018-03-01 07:13:01264
265 export_class_attribute_blink = "CORE_EXPORT"
266 export_define_blink = "BLINK_CORE_IMPLEMENTATION=1"
Blink Reformata30d4232018-04-07 15:31:06267 export_header_blink = "third_party/blink/renderer/core/core_export.h"
Kinuko Yasudafa0f2512018-03-01 07:13:01268}
Chase Phillips4f62c052018-11-06 01:43:51269
270# This target can include mojom interfaces which use types that are typemapped
271# to a type in renderer/modules. This also means these interfaces are not
272# available from renderer/platform or renderer/core.
273mojom("mojom_modules") {
274 sources = [
275 "indexeddb/indexeddb.mojom",
276 ]
277
278 public_deps = [
279 ":mojom_core",
280
281 # TODO(https://crbug.com/822804): Remove when mojom bindings deps checks
282 # get fixed.
283 ":mojom_platform",
284 "//mojo/public/mojom/base",
285 "//skia/public/interfaces",
286 "//url/mojom:url_mojom_gurl",
287 "//url/mojom:url_mojom_origin",
288 ]
289
290 overridden_deps_blink = [
291 ":mojom_core",
292 ":mojom_platform",
293 ]
294 component_deps_blink = [ "//third_party/blink/renderer/core" ]
295
296 export_class_attribute = "BLINK_COMMON_EXPORT"
297 export_define = "BLINK_COMMON_IMPLEMENTATION=1"
298 export_header = "third_party/blink/public/common/common_export.h"
299
300 export_class_attribute_blink = "MODULES_EXPORT"
301 export_define_blink = "BLINK_MODULES_IMPLEMENTATION=1"
302 export_header_blink = "third_party/blink/renderer/modules/modules_export.h"
303}
Ian Wellscbc4e6f2019-02-07 22:07:57304
305mojom("mojom_mhtml_load_result") {
306 sources = [
307 "loader/mhtml_load_result.mojom",
308 ]
309
310 export_class_attribute = "BLINK_COMMON_EXPORT"
311 export_define = "BLINK_COMMON_IMPLEMENTATION=1"
312 export_header = "third_party/blink/public/common/common_export.h"
313}
Julie Jeongeun Kim184d78a62019-03-01 02:10:15314
315# The web_feature_mojo_bindings is separated from the rest of the mojom files
316# because the chromium typemap for blink mojo_bindings has private content
317# dependencies.
318mojom_component("web_feature_mojo_bindings") {
319 sources = [
320 "web_feature/web_feature.mojom",
321 ]
322
323 macro_prefix = "WEB_FEATURE_MOJO_BINDINGS_MOJOM"
324 output_prefix = "web_feature_mojo_bindings_mojom"
325}
Julie Jeongeun Kim573ba3d2019-03-01 11:35:22326
327# The web_client_hints_types_mojo_bindings is separated from the rest of the
328# mojom files because the chromium typemap for blink mojo_bindings has private
329# content dependencies.
330mojom("web_client_hints_types_mojo_bindings") {
331 sources = [
332 "web_client_hints/web_client_hints_types.mojom",
333 ]
334}