summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/public/mojom/BUILD.gn
blob: 731da16b5a0fc463cc9e956101cd56be0b8e4d6f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
# Copyright 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//mojo/public/tools/bindings/mojom.gni")

# This target includes all mojom interfaces which can be used from
# renderer/platform. In particular these mojom interfaces can't use types that
# are typemapped to a type in renderer/core.
mojom("mojom_platform") {
  sources = [
    "ad_tagging/ad_frame.mojom",
    "appcache/appcache.mojom",
    "appcache/appcache_info.mojom",
    "array_buffer/array_buffer_contents.mojom",
    "associated_interfaces/associated_interfaces.mojom",
    "background_fetch/background_fetch.mojom",
    "blob/blob.mojom",
    "blob/blob_registry.mojom",
    "blob/blob_url_store.mojom",
    "blob/data_element.mojom",
    "blob/serialized_blob.mojom",
    "cache_storage/cache_storage.mojom",
    "choosers/file_chooser.mojom",
    "clipboard/clipboard.mojom",
    "color_chooser/color_chooser.mojom",
    "contacts/contacts_manager.mojom",
    "cookie_store/cookie_store.mojom",
    "crash/crash_memory_metrics_reporter.mojom",
    "csp/content_security_policy.mojom",
    "devtools/console_message.mojom",
    "devtools/devtools_agent.mojom",
    "dom_storage/session_storage_namespace.mojom",
    "dom_storage/storage_area.mojom",
    "dom_storage/storage_partition_service.mojom",
    "feature_policy/feature_policy.mojom",
    "fetch/fetch_api_request.mojom",
    "fetch/fetch_api_response.mojom",
    "file/file_utilities.mojom",
    "filesystem/file_system.mojom",
    "filesystem/file_writer.mojom",
    "frame/document_interface_broker.mojom",
    "frame/find_in_page.mojom",
    "frame/frame_host_test_interface.mojom",
    "frame/navigation_initiator.mojom",
    "leak_detector/leak_detector.mojom",
    "loader/code_cache.mojom",
    "loader/navigation_predictor.mojom",
    "loader/pause_subresource_loading_handle.mojom",
    "loader/previews_resource_loading_hints.mojom",
    "loader/url_loader_factory_bundle.mojom",
    "manifest/display_mode.mojom",
    "manifest/manifest.mojom",
    "manifest/manifest_manager.mojom",
    "mediastream/media_devices.mojom",
    "mediastream/media_stream.mojom",
    "net/ip_address_space.mojom",
    "notifications/notification.mojom",
    "page/display_cutout.mojom",
    "payments/payment_app.mojom",
    "plugins/plugin_registry.mojom",
    "presentation/presentation.mojom",
    "quota/quota_dispatcher_host.mojom",
    "quota/quota_types.mojom",
    "referrer.mojom",
    "script/script_type.mojom",
    "serial/serial.mojom",
    "service_worker/dispatch_fetch_event_params.mojom",
    "service_worker/navigation_preload_state.mojom",
    "service_worker/service_worker_client.mojom",
    "service_worker/service_worker_error_type.mojom",
    "service_worker/service_worker_event_status.mojom",
    "service_worker/service_worker_fetch_response_callback.mojom",
    "service_worker/service_worker_installed_scripts_manager.mojom",
    "service_worker/service_worker_provider_type.mojom",
    "service_worker/service_worker_state.mojom",
    "service_worker/service_worker_stream_handle.mojom",
    "speech/speech_recognition_error.mojom",
    "speech/speech_recognition_grammar.mojom",
    "speech/speech_recognition_result.mojom",
    "speech/speech_recognizer.mojom",
    "use_counter/css_property_id.mojom",
    "wake_lock/wake_lock.mojom",
    "webaudio/audio_context_manager.mojom",
    "worker/dedicated_worker_factory.mojom",
    "worker/shared_worker.mojom",
    "worker/shared_worker_client.mojom",
    "worker/shared_worker_connector.mojom",
    "worker/shared_worker_creation_context_type.mojom",
    "worker/shared_worker_host.mojom",
    "worker/shared_worker_info.mojom",
    "worker/worker_content_settings_proxy.mojom",
    "worker/worker_main_script_load_params.mojom",
  ]

  if (is_win) {
    sources += [ "dwrite_font_proxy/dwrite_font_proxy.mojom" ]
  }

  public_deps = [
    ":android_mojo_bindings",
    ":speech_recognition_error_code",
    "//components/payments/mojom",
    "//components/services/filesystem/public/interfaces",
    "//mojo/public/mojom/base",
    "//services/device/public/mojom",
    "//services/network/public/mojom",
    "//services/service_manager/public/mojom",
    "//skia/public/interfaces",
    "//third_party/blink/public:web_feature_mojo_bindings",
    "//third_party/blink/public/mojom/usb",
    "//ui/gfx/geometry/mojo",
    "//url/mojom:url_mojom_gurl",
    "//url/mojom:url_mojom_origin",
  ]

  # iOS doesn't use and must not depend on //media
  if (!is_ios) {
    public_deps += [
      "//media/capture/mojom:video_capture",
      "//media/mojo/interfaces",
    ]
  }

  export_class_attribute = "BLINK_COMMON_EXPORT"
  export_define = "BLINK_COMMON_IMPLEMENTATION=1"
  export_header = "third_party/blink/public/common/common_export.h"

  export_class_attribute_blink = "PLATFORM_EXPORT"
  export_define_blink = "BLINK_PLATFORM_IMPLEMENTATION=1"
  export_header_blink = "third_party/blink/renderer/platform/platform_export.h"
}

# Kept separate from "mojom_platform" because the Java bindings are specifically
# needed by Android's implementation of payments
# (in components/payments/content/android and chrome/android/).
mojom("android_mojo_bindings") {
  sources = [
    "payments/payment_request.mojom",
  ]
  public_deps = [
    "//components/payments/mojom",
  ]

  export_class_attribute = "BLINK_COMMON_EXPORT"
  export_define = "BLINK_COMMON_IMPLEMENTATION=1"
  export_header = "third_party/blink/public/common/common_export.h"

  export_class_attribute_blink = "PLATFORM_EXPORT"
  export_define_blink = "BLINK_PLATFORM_IMPLEMENTATION=1"
  export_header_blink = "third_party/blink/renderer/platform/platform_export.h"
}

# Kept separate from "mojom_platform" because the Java bindings are needed by
# Android's implementation of speech recognition.
mojom_component("speech_recognition_error_code") {
  sources = [
    "speech/speech_recognition_error_code.mojom",
  ]

  macro_prefix = "SPEECH_RECOGNITION_ERROR_CODE_MOJOM"
  output_prefix = "speech_recognition_error_code_mojom"
}

# This target can include mojom interfaces which do use types that are
# typemapped to a type in renderer/core. This also means these interfaces are
# not available from renderer/platform.
# 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.
# In future we may have a separate mojom target for the things that may have
# modules dependencies if it looks necessary, at that time we can put all of
# those high-level service worker mojom files there.
mojom("mojom_core") {
  sources = [
    "messaging/cloneable_message.mojom",
    "messaging/transferable_message.mojom",
    "messaging/user_activation_snapshot.mojom",
    "portal/portal.mojom",
    "service_worker/controller_service_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",
  ]

  public_deps = [
    ":mojom_platform",
    "//components/payments/mojom",
    "//mojo/public/mojom/base",
    "//services/network/public/mojom",
    "//services/service_manager/public/mojom",
    "//skia/public/interfaces",
    "//third_party/blink/public:web_feature_mojo_bindings",
    "//url/mojom:url_mojom_gurl",
    "//url/mojom:url_mojom_origin",
  ]

  overridden_deps_blink = [
    ":mojom_platform",
    "//services/network/public/mojom",
  ]
  component_deps_blink = [ "//third_party/blink/renderer/platform" ]

  export_class_attribute = "BLINK_COMMON_EXPORT"
  export_define = "BLINK_COMMON_IMPLEMENTATION=1"
  export_header = "third_party/blink/public/common/common_export.h"

  export_class_attribute_blink = "CORE_EXPORT"
  export_define_blink = "BLINK_CORE_IMPLEMENTATION=1"
  export_header_blink = "third_party/blink/renderer/core/core_export.h"
}

# This target can include mojom interfaces which use types that are typemapped
# to a type in renderer/modules. This also means these interfaces are not
# available from renderer/platform or renderer/core.
mojom("mojom_modules") {
  sources = [
    "indexeddb/indexeddb.mojom",
  ]

  public_deps = [
    ":mojom_core",

    # TODO(https://crbug.com/822804): Remove when mojom bindings deps checks
    # get fixed.
    ":mojom_platform",
    "//mojo/public/mojom/base",
    "//skia/public/interfaces",
    "//url/mojom:url_mojom_gurl",
    "//url/mojom:url_mojom_origin",
  ]

  overridden_deps_blink = [
    ":mojom_core",
    ":mojom_platform",
  ]
  component_deps_blink = [ "//third_party/blink/renderer/core" ]

  export_class_attribute = "BLINK_COMMON_EXPORT"
  export_define = "BLINK_COMMON_IMPLEMENTATION=1"
  export_header = "third_party/blink/public/common/common_export.h"

  export_class_attribute_blink = "MODULES_EXPORT"
  export_define_blink = "BLINK_MODULES_IMPLEMENTATION=1"
  export_header_blink = "third_party/blink/renderer/modules/modules_export.h"
}