blob: a5409f91007232a3bd3ef6b64488e33cb3388da6 [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 Kim78e772b2019-03-08 23:21:5921 "badging/badging.mojom",
Kinuko Yasudafa0f2512018-03-01 07:13:0122 "blob/blob.mojom",
23 "blob/blob_registry.mojom",
24 "blob/blob_url_store.mojom",
25 "blob/data_element.mojom",
26 "blob/serialized_blob.mojom",
Richard Libcc09eb2018-11-30 15:00:3527 "cache_storage/cache_storage.mojom",
Abhijeet Kandalkar849ceff2019-02-28 17:37:2928 "choosers/color_chooser.mojom",
Kent Tamurac260c9a2018-09-14 09:10:5629 "choosers/file_chooser.mojom",
Kinuko Yasudafa0f2512018-03-01 07:13:0130 "clipboard/clipboard.mojom",
Finnur Thorarinsson522d3782018-12-05 02:17:4331 "contacts/contacts_manager.mojom",
Victor Costan7184272a2018-05-15 13:17:4332 "cookie_store/cookie_store.mojom",
Yuzu Saijo2d12ef92018-08-21 04:52:0733 "crash/crash_memory_metrics_reporter.mojom",
Hiroki Nakagawa792fcc32018-12-06 06:50:5734 "csp/content_security_policy.mojom",
Leon Han797b2132019-01-20 12:43:1835 "devtools/console_message.mojom",
Hiroki Nakagawa7c0a7e72018-12-10 04:31:2936 "devtools/devtools_agent.mojom",
Marijn Kruisselbrink4712c332018-06-13 19:06:5937 "dom_storage/session_storage_namespace.mojom",
Marijn Kruisselbrinkf9a9e762018-06-07 18:57:1238 "dom_storage/storage_area.mojom",
Marijn Kruisselbrink4712c332018-06-13 19:06:5939 "dom_storage/storage_partition_service.mojom",
Kinuko Yasudafa0f2512018-03-01 07:13:0140 "feature_policy/feature_policy.mojom",
Richard Lie6899952018-11-30 08:42:0041 "fetch/fetch_api_request.mojom",
Han Leon6bbe7912018-07-31 01:13:4642 "fetch/fetch_api_response.mojom",
Jeremy Roman89a4d0d2018-04-26 19:05:2843 "file/file_utilities.mojom",
Adithya Srinivasan0c72ff02018-08-13 19:47:2944 "filesystem/file_system.mojom",
Marijn Kruisselbrink16af1982018-08-15 21:22:3545 "filesystem/file_writer.mojom",
Oksana Zhuravlova8b88e572019-01-07 21:54:0046 "frame/document_interface_broker.mojom",
Rakina Zata Amniacf40492018-05-08 22:59:3347 "frame/find_in_page.mojom",
Oksana Zhuravlova8b88e572019-01-07 21:54:0048 "frame/frame_host_test_interface.mojom",
Dave Tapuskad6703f912019-01-31 23:13:1149 "frame/lifecycle.mojom",
Andy Paicuc93d30862018-10-10 15:33:4550 "frame/navigation_initiator.mojom",
Dmitry Gozmand016d882018-04-20 01:55:2451 "leak_detector/leak_detector.mojom",
Bill Budge24c1dc1a2018-09-25 18:51:3252 "loader/code_cache.mojom",
Lu Chen5bec7a302018-06-26 18:52:3253 "loader/navigation_predictor.mojom",
Ryan Sturmc65dbe42018-05-31 20:37:0454 "loader/pause_subresource_loading_handle.mojom",
Tarun Bansaldc970292018-07-12 00:02:5855 "loader/previews_resource_loading_hints.mojom",
Hiroki Nakagawa753758342018-12-27 04:13:4956 "loader/url_loader_factory_bundle.mojom",
Dmitry Gozman88ca5a992018-05-18 00:13:3357 "manifest/display_mode.mojom",
58 "manifest/manifest.mojom",
59 "manifest/manifest_manager.mojom",
Guido Urdanetad45f3ed62019-01-16 13:48:1860 "mediastream/media_devices.mojom",
Guido Urdaneta73fa6632019-01-14 18:46:2661 "mediastream/media_stream.mojom",
Julie Jeongeun Kim97410ad2019-02-27 08:04:5162 "mime/mime_registry.mojom",
Kinuko Yasudafa0f2512018-03-01 07:13:0163 "net/ip_address_space.mojom",
Han Leon96d6b6e8c22018-09-06 06:21:0664 "notifications/notification.mojom",
Julie Jeongeun Kim08999f292019-02-27 23:30:4165 "oom_intervention/oom_intervention.mojom",
Becca Hughes6fe54e432018-06-09 04:18:5666 "page/display_cutout.mojom",
Han Leonabbe7c902018-08-30 02:08:1067 "payments/payment_app.mojom",
Mounir Lamouri99ba5a62019-02-12 01:27:4768 "picture_in_picture/picture_in_picture.mojom",
Jeremy Romanb7024742018-06-18 22:00:2269 "plugins/plugin_registry.mojom",
mark a. foltz6bbe59f2018-07-24 20:06:2470 "presentation/presentation.mojom",
Kinuko Yasudafa0f2512018-03-01 07:13:0171 "quota/quota_dispatcher_host.mojom",
72 "quota/quota_types.mojom",
Leon Han075e0b32018-11-06 07:59:4473 "referrer.mojom",
Leon Hanf4003a162019-01-28 05:31:5874 "renderer_preference_watcher.mojom",
Leon Hanc819dc62019-01-28 04:30:1975 "renderer_preferences.mojom",
Julie Jeongeun Kim9912f2e2019-03-01 03:30:1876 "reporting/reporting.mojom",
Hiroki Nakagawa4b072c62018-11-07 03:57:2577 "script/script_type.mojom",
Reilly Grante4f46642019-03-04 22:41:5978 "serial/serial.mojom",
Han Leon122d28182018-06-26 07:56:5579 "service_worker/dispatch_fetch_event_params.mojom",
Kinuko Yasudafa0f2512018-03-01 07:13:0180 "service_worker/navigation_preload_state.mojom",
Kinuko Yasudafa0f2512018-03-01 07:13:0181 "service_worker/service_worker_client.mojom",
82 "service_worker/service_worker_error_type.mojom",
83 "service_worker/service_worker_event_status.mojom",
Han Leon9a3a2fb2018-08-07 02:56:0184 "service_worker/service_worker_fetch_response_callback.mojom",
Kinuko Yasudafa0f2512018-03-01 07:13:0185 "service_worker/service_worker_installed_scripts_manager.mojom",
Kinuko Yasudafa0f2512018-03-01 07:13:0186 "service_worker/service_worker_provider_type.mojom",
Kinuko Yasudafa0f2512018-03-01 07:13:0187 "service_worker/service_worker_state.mojom",
88 "service_worker/service_worker_stream_handle.mojom",
Julie Jeongeun Kim9912f2e2019-03-01 03:30:1889 "site_engagement/site_engagement.mojom",
Adithya Srinivasanc35bf3962018-06-12 14:28:1490 "speech/speech_recognition_error.mojom",
91 "speech/speech_recognition_grammar.mojom",
92 "speech/speech_recognition_result.mojom",
93 "speech/speech_recognizer.mojom",
Julie Jeongeun Kim9912f2e2019-03-01 03:30:1894 "ukm/ukm.mojom",
Luna Lu29d922d2018-03-27 18:06:5195 "use_counter/css_property_id.mojom",
Mike West6e4cbb32019-02-13 09:40:1796 "user_agent/user_agent_metadata.mojom",
Leon Hancaae6db2019-02-03 03:37:5497 "v8_cache_options.mojom",
Mounir Lamouri54c31f52018-12-09 02:52:5498 "wake_lock/wake_lock.mojom",
Raymond Toye413650c2018-08-31 00:12:4799 "webaudio/audio_context_manager.mojom",
Hiroki Nakagawa2da3b582018-12-10 06:44:52100 "worker/shared_worker.mojom",
Hiroki Nakagawad0dee832018-12-04 11:19:10101 "worker/shared_worker_client.mojom",
Hiroki Nakagawa0e677762018-12-06 14:55:38102 "worker/shared_worker_connector.mojom",
Hiroki Nakagawa32376a52018-12-03 10:49:23103 "worker/shared_worker_creation_context_type.mojom",
Hiroki Nakagawa86d9e0e2018-12-06 10:55:00104 "worker/shared_worker_host.mojom",
Hiroki Nakagawa1f236df2018-12-06 06:55:27105 "worker/shared_worker_info.mojom",
Leon Han6ac123d2019-01-17 07:52:25106 "worker/worker_content_settings_proxy.mojom",
Hiroki Nakagawa32376a52018-12-03 10:49:23107 "worker/worker_main_script_load_params.mojom",
Kinuko Yasudafa0f2512018-03-01 07:13:01108 ]
109
Dominik Röttsches24f9d162019-01-04 10:43:56110 if (is_win) {
111 sources += [ "dwrite_font_proxy/dwrite_font_proxy.mojom" ]
112 }
113
Kinuko Yasudafa0f2512018-03-01 07:13:01114 public_deps = [
Han Leonabbe7c902018-08-30 02:08:10115 ":android_mojo_bindings",
Ian Wellscbc4e6f2019-02-07 22:07:57116 ":mojom_mhtml_load_result",
Adithya Srinivasanc35bf3962018-06-12 14:28:14117 ":speech_recognition_error_code",
Julie Jeongeun Kim573ba3d2019-03-01 11:35:22118 ":web_client_hints_types_mojo_bindings",
Julie Jeongeun Kim184d78a62019-03-01 02:10:15119 ":web_feature_mojo_bindings",
Han Leonabbe7c902018-08-30 02:08:10120 "//components/payments/mojom",
Adithya Srinivasan0c72ff02018-08-13 19:47:29121 "//components/services/filesystem/public/interfaces",
Oksana Zhuravlova015487b32018-03-09 06:58:22122 "//mojo/public/mojom/base",
Dmitry Gozman88ca5a992018-05-18 00:13:33123 "//services/device/public/mojom",
Kinuko Yasudafa0f2512018-03-01 07:13:01124 "//services/network/public/mojom",
Hiroki Nakagawac30b9f02018-12-03 11:26:01125 "//services/service_manager/public/mojom",
Mounir Lamouri99ba5a62019-02-12 01:27:47126 "//services/viz/public/interfaces",
Mike Wasserman384f907d2018-06-01 01:50:56127 "//skia/public/interfaces",
Donna Wu838ac362018-08-10 10:36:33128 "//third_party/blink/public/mojom/usb",
Kinuko Yasudafa0f2512018-03-01 07:13:01129 "//ui/gfx/geometry/mojo",
Leon Hanc819dc62019-01-28 04:30:19130 "//ui/gfx/mojo",
Kinuko Yasudafa0f2512018-03-01 07:13:01131 "//url/mojom:url_mojom_gurl",
132 "//url/mojom:url_mojom_origin",
133 ]
134
Guido Urdaneta73fa6632019-01-14 18:46:26135 # iOS doesn't use and must not depend on //media
136 if (!is_ios) {
137 public_deps += [
138 "//media/capture/mojom:video_capture",
139 "//media/mojo/interfaces",
140 ]
141 }
142
Leon Hanc819dc62019-01-28 04:30:19143 if (is_linux || is_chromeos) {
144 enabled_features = [ "renderer_pref_system_font_family_name" ]
145 }
146
Kinuko Yasudafa0f2512018-03-01 07:13:01147 export_class_attribute = "BLINK_COMMON_EXPORT"
148 export_define = "BLINK_COMMON_IMPLEMENTATION=1"
Daniel Bratell54449102018-10-29 22:21:43149 export_header = "third_party/blink/public/common/common_export.h"
Kinuko Yasudafa0f2512018-03-01 07:13:01150
151 export_class_attribute_blink = "PLATFORM_EXPORT"
152 export_define_blink = "BLINK_PLATFORM_IMPLEMENTATION=1"
Blink Reformata30d4232018-04-07 15:31:06153 export_header_blink = "third_party/blink/renderer/platform/platform_export.h"
Kinuko Yasudafa0f2512018-03-01 07:13:01154}
155
Han Leonabbe7c902018-08-30 02:08:10156# Kept separate from "mojom_platform" because the Java bindings are specifically
157# needed by Android's implementation of payments
Julie Jeongeun Kim7de77e92019-02-27 00:14:15158# (in components/payments/content/android and chrome/android/)
159# and input (in android_webview/ and content/browser/android/).
Han Leonabbe7c902018-08-30 02:08:10160mojom("android_mojo_bindings") {
161 sources = [
Julie Jeongeun Kim7de77e92019-02-27 00:14:15162 "input/input_host.mojom",
163 "input/input_messages.mojom",
Han Leonabbe7c902018-08-30 02:08:10164 "payments/payment_request.mojom",
165 ]
166 public_deps = [
167 "//components/payments/mojom",
168 ]
169
Julie Jeongeun Kim9912f2e2019-03-01 03:30:18170 # This Android unhandled-tap feature uses another mojo source, add it in.
171 if (enable_unhandled_tap) {
172 sources += [ "unhandled_tap_notifier/unhandled_tap_notifier.mojom" ]
173 public_deps += [ "//ui/gfx/geometry/mojo" ]
174 }
175
Han Leonabbe7c902018-08-30 02:08:10176 export_class_attribute = "BLINK_COMMON_EXPORT"
177 export_define = "BLINK_COMMON_IMPLEMENTATION=1"
Daniel Bratell54449102018-10-29 22:21:43178 export_header = "third_party/blink/public/common/common_export.h"
Han Leonabbe7c902018-08-30 02:08:10179
180 export_class_attribute_blink = "PLATFORM_EXPORT"
181 export_define_blink = "BLINK_PLATFORM_IMPLEMENTATION=1"
182 export_header_blink = "third_party/blink/renderer/platform/platform_export.h"
183}
184
Adithya Srinivasanc35bf3962018-06-12 14:28:14185# Kept separate from "mojom_platform" because the Java bindings are needed by
186# Android's implementation of speech recognition.
Takuto Ikuta55f5c1372019-01-24 05:37:28187mojom_component("speech_recognition_error_code") {
Adithya Srinivasanc35bf3962018-06-12 14:28:14188 sources = [
189 "speech/speech_recognition_error_code.mojom",
190 ]
Takuto Ikuta55f5c1372019-01-24 05:37:28191
192 macro_prefix = "SPEECH_RECOGNITION_ERROR_CODE_MOJOM"
193 output_prefix = "speech_recognition_error_code_mojom"
Adithya Srinivasanc35bf3962018-06-12 14:28:14194}
195
Kinuko Yasudafa0f2512018-03-01 07:13:01196# This target can include mojom interfaces which do use types that are
Chase Phillips4f62c052018-11-06 01:43:51197# typemapped to a type in renderer/core. This also means these interfaces are
198# not available from renderer/platform.
Hiroki Nakagawa9144ec862019-01-28 10:12:44199#
Han Leonb2f46cd2018-03-09 01:59:16200# In future we may have a separate mojom target for the things that may have
201# modules dependencies if it looks necessary, at that time we can put all of
202# those high-level service worker mojom files there.
Han Leon19420c72018-03-08 01:59:55203mojom("mojom_core") {
Kinuko Yasudafa0f2512018-03-01 07:13:01204 sources = [
Zhuoyu Qianb647e772018-09-19 04:04:47205 "messaging/cloneable_message.mojom",
206 "messaging/transferable_message.mojom",
Zhuoyu Qian47ed0fc52018-09-06 02:13:40207 "messaging/user_activation_snapshot.mojom",
Lucas Furukawa Gadani72655072018-07-26 22:34:33208 "portal/portal.mojom",
Hiroki Nakagawa9144ec862019-01-28 10:12:44209
210 # Note that service_worker_object.mojom and service_worker.mojom depend on
211 # transferable_message.mojom, and controller_service_worker.mojom and
212 # service_worker_registration.mojom depend on service_worker_object.mojom,
213 # so we put these service worker mojom files here rather than mojom_platform
214 # target.
Hiroki Nakagawacdbc7912018-11-30 11:30:05215 "service_worker/controller_service_worker.mojom",
Leon Han6e7c6e2f2019-02-03 07:26:56216 "service_worker/embedded_worker.mojom",
Han Leon94335e42018-03-15 08:44:18217 "service_worker/service_worker.mojom",
Richard Li743a69f2018-12-21 06:44:56218 "service_worker/service_worker_container.mojom",
Han Leonb2f46cd2018-03-09 01:59:16219 "service_worker/service_worker_object.mojom",
Richard Li32fb39202018-12-21 06:49:41220 "service_worker/service_worker_provider.mojom",
Han Leonb2f46cd2018-03-09 01:59:16221 "service_worker/service_worker_registration.mojom",
Hiroki Nakagawa9144ec862019-01-28 10:12:44222
223 # Depends on controller_service_worker.mojom.
Hiroki Nakagawa3d14c4f2019-02-09 01:27:30224 "worker/dedicated_worker_host_factory.mojom",
Hiroki Nakagawa9144ec862019-01-28 10:12:44225 "worker/shared_worker_factory.mojom",
Kinuko Yasudafa0f2512018-03-01 07:13:01226 ]
227
228 public_deps = [
229 ":mojom_platform",
Julie Jeongeun Kim184d78a62019-03-01 02:10:15230 ":web_feature_mojo_bindings",
Richard Li99e67742018-12-20 05:28:13231 "//components/payments/mojom",
Ken Rockot1ca39312018-04-12 05:32:55232 "//mojo/public/mojom/base",
Richard Li99e67742018-12-20 05:28:13233 "//services/network/public/mojom",
Richard Li32fb39202018-12-21 06:49:41234 "//services/service_manager/public/mojom",
Kinuko Yasudafa0f2512018-03-01 07:13:01235 "//skia/public/interfaces",
Han Leonb2f46cd2018-03-09 01:59:16236 "//url/mojom:url_mojom_gurl",
Richard Li99e67742018-12-20 05:28:13237 "//url/mojom:url_mojom_origin",
Kinuko Yasudafa0f2512018-03-01 07:13:01238 ]
239
Richard Li99e67742018-12-20 05:28:13240 overridden_deps_blink = [
241 ":mojom_platform",
242 "//services/network/public/mojom",
243 ]
Blink Reformata30d4232018-04-07 15:31:06244 component_deps_blink = [ "//third_party/blink/renderer/platform" ]
Kinuko Yasudafa0f2512018-03-01 07:13:01245
246 export_class_attribute = "BLINK_COMMON_EXPORT"
247 export_define = "BLINK_COMMON_IMPLEMENTATION=1"
Daniel Bratell54449102018-10-29 22:21:43248 export_header = "third_party/blink/public/common/common_export.h"
Kinuko Yasudafa0f2512018-03-01 07:13:01249
250 export_class_attribute_blink = "CORE_EXPORT"
251 export_define_blink = "BLINK_CORE_IMPLEMENTATION=1"
Blink Reformata30d4232018-04-07 15:31:06252 export_header_blink = "third_party/blink/renderer/core/core_export.h"
Kinuko Yasudafa0f2512018-03-01 07:13:01253}
Chase Phillips4f62c052018-11-06 01:43:51254
255# This target can include mojom interfaces which use types that are typemapped
256# to a type in renderer/modules. This also means these interfaces are not
257# available from renderer/platform or renderer/core.
258mojom("mojom_modules") {
259 sources = [
260 "indexeddb/indexeddb.mojom",
261 ]
262
263 public_deps = [
264 ":mojom_core",
265
266 # TODO(https://crbug.com/822804): Remove when mojom bindings deps checks
267 # get fixed.
268 ":mojom_platform",
269 "//mojo/public/mojom/base",
270 "//skia/public/interfaces",
271 "//url/mojom:url_mojom_gurl",
272 "//url/mojom:url_mojom_origin",
273 ]
274
275 overridden_deps_blink = [
276 ":mojom_core",
277 ":mojom_platform",
278 ]
279 component_deps_blink = [ "//third_party/blink/renderer/core" ]
280
281 export_class_attribute = "BLINK_COMMON_EXPORT"
282 export_define = "BLINK_COMMON_IMPLEMENTATION=1"
283 export_header = "third_party/blink/public/common/common_export.h"
284
285 export_class_attribute_blink = "MODULES_EXPORT"
286 export_define_blink = "BLINK_MODULES_IMPLEMENTATION=1"
287 export_header_blink = "third_party/blink/renderer/modules/modules_export.h"
288}
Ian Wellscbc4e6f2019-02-07 22:07:57289
290mojom("mojom_mhtml_load_result") {
291 sources = [
292 "loader/mhtml_load_result.mojom",
293 ]
294
295 export_class_attribute = "BLINK_COMMON_EXPORT"
296 export_define = "BLINK_COMMON_IMPLEMENTATION=1"
297 export_header = "third_party/blink/public/common/common_export.h"
298}
Julie Jeongeun Kim184d78a62019-03-01 02:10:15299
300# The web_feature_mojo_bindings is separated from the rest of the mojom files
301# because the chromium typemap for blink mojo_bindings has private content
302# dependencies.
303mojom_component("web_feature_mojo_bindings") {
304 sources = [
305 "web_feature/web_feature.mojom",
306 ]
307
308 macro_prefix = "WEB_FEATURE_MOJO_BINDINGS_MOJOM"
309 output_prefix = "web_feature_mojo_bindings_mojom"
310}
Julie Jeongeun Kim573ba3d2019-03-01 11:35:22311
312# The web_client_hints_types_mojo_bindings is separated from the rest of the
313# mojom files because the chromium typemap for blink mojo_bindings has private
314# content dependencies.
315mojom("web_client_hints_types_mojo_bindings") {
316 sources = [
317 "web_client_hints/web_client_hints_types.mojom",
318 ]
319}