naiveproxy/third_party/blink/renderer/bindings/modules/BUILD.gn
2018-08-11 05:35:24 +00:00

208 lines
9.0 KiB
Plaintext

# Copyright 2014 Tfe 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("//third_party/blink/renderer/modules/modules.gni")
import("//third_party/blink/renderer/bindings/scripts/scripts.gni")
import("//third_party/blink/renderer/build/scripts/scripts.gni")
group("bindings_modules_generated") {
visibility = [ "//third_party/blink/*" ]
public_deps = [
":event_modules",
":event_modules_names",
":event_target_modules_names",
":modules_bindings_generated_event_interfaces",
]
}
generate_event_interfaces("modules_bindings_generated_event_interfaces") {
sources = [
"//third_party/blink/renderer/modules/app_banner/before_install_prompt_event.idl",
"//third_party/blink/renderer/modules/background_fetch/background_fetch_click_event.idl",
"//third_party/blink/renderer/modules/background_fetch/background_fetch_event.idl",
"//third_party/blink/renderer/modules/background_fetch/background_fetch_fail_event.idl",
"//third_party/blink/renderer/modules/background_fetch/background_fetched_event.idl",
"//third_party/blink/renderer/modules/background_sync/sync_event.idl",
"//third_party/blink/renderer/modules/cookie_store/cookie_change_event.idl",
"//third_party/blink/renderer/modules/cookie_store/extendable_cookie_change_event.idl",
"//third_party/blink/renderer/modules/device_orientation/device_motion_event.idl",
"//third_party/blink/renderer/modules/device_orientation/device_orientation_event.idl",
"//third_party/blink/renderer/modules/encryptedmedia/media_encrypted_event.idl",
"//third_party/blink/renderer/modules/encryptedmedia/media_key_message_event.idl",
"//third_party/blink/renderer/modules/gamepad/gamepad_event.idl",
"//third_party/blink/renderer/modules/indexeddb/idb_version_change_event.idl",
"//third_party/blink/renderer/modules/mediarecorder/blob_event.idl",
"//third_party/blink/renderer/modules/mediastream/media_stream_event.idl",
"//third_party/blink/renderer/modules/mediastream/media_stream_track_event.idl",
"//third_party/blink/renderer/modules/notifications/notification_event.idl",
"//third_party/blink/renderer/modules/payments/abort_payment_event.idl",
"//third_party/blink/renderer/modules/payments/can_make_payment_event.idl",
"//third_party/blink/renderer/modules/payments/payment_request_event.idl",
"//third_party/blink/renderer/modules/payments/payment_request_update_event.idl",
"//third_party/blink/renderer/modules/peerconnection/rtc_data_channel_event.idl",
"//third_party/blink/renderer/modules/peerconnection/rtc_dtmf_tone_change_event.idl",
"//third_party/blink/renderer/modules/peerconnection/rtc_peer_connection_ice_event.idl",
"//third_party/blink/renderer/modules/presentation/presentation_connection_available_event.idl",
"//third_party/blink/renderer/modules/presentation/presentation_connection_close_event.idl",
"//third_party/blink/renderer/modules/push_messaging/push_event.idl",
"//third_party/blink/renderer/modules/sensor/sensor_error_event.idl",
"//third_party/blink/renderer/modules/serviceworkers/extendable_event.idl",
"//third_party/blink/renderer/modules/serviceworkers/extendable_message_event.idl",
"//third_party/blink/renderer/modules/serviceworkers/fetch_event.idl",
"//third_party/blink/renderer/modules/serviceworkers/install_event.idl",
"//third_party/blink/renderer/modules/speech/speech_recognition_error.idl",
"//third_party/blink/renderer/modules/speech/speech_recognition_event.idl",
"//third_party/blink/renderer/modules/speech/speech_synthesis_event.idl",
"//third_party/blink/renderer/modules/storage/storage_event.idl",
"//third_party/blink/renderer/modules/vr/vr_display_event.idl",
"//third_party/blink/renderer/modules/webaudio/audio_processing_event.idl",
"//third_party/blink/renderer/modules/webaudio/offline_audio_completion_event.idl",
"//third_party/blink/renderer/modules/webgl/webgl_context_event.idl",
"//third_party/blink/renderer/modules/webmidi/midi_connection_event.idl",
"//third_party/blink/renderer/modules/webmidi/midi_message_event.idl",
"//third_party/blink/renderer/modules/websockets/close_event.idl",
"//third_party/blink/renderer/modules/xr/xr_input_source_event.idl",
"//third_party/blink/renderer/modules/xr/xr_session_event.idl",
]
output_file = "event_modules_names.json5"
suffix = "Modules"
}
make_event_factory("event_modules") {
visibility = [ ":*" ]
in_files =
[ "$root_gen_dir/third_party/blink/renderer/event_modules_names.json5" ]
outputs = [
"$blink_modules_output_dir/event_modules_factory.cc",
]
deps = make_core_generated_deps + [ "//third_party/blink/renderer/bindings/modules:modules_bindings_generated_event_interfaces" ]
deps += [ "//media/midi:mojo_blink" ]
}
make_names("event_modules_names") {
visibility = [ ":*" ]
in_files =
[ "$root_gen_dir/third_party/blink/renderer/event_modules_names.json5" ]
output_dir = blink_modules_output_dir
deps = make_core_generated_deps + [ "//third_party/blink/renderer/bindings/modules:modules_bindings_generated_event_interfaces" ]
}
make_names("event_target_modules_names") {
visibility = [ ":*" ]
in_files = [ "../../modules/event_target_modules_names.json5" ]
output_dir = blink_modules_output_dir
}
# ------------------------------------------------------------------------------
compute_interfaces_info_individual("interfaces_info_individual_modules") {
sources = modules_static_interface_idl_files + modules_definition_idl_files +
modules_static_dependency_idl_files +
modules_generated_dependency_idl_files
interfaces_info_file =
"$bindings_modules_output_dir/InterfacesInfoOverallIndividual.pickle"
component_info_file =
"$bindings_modules_output_dir/ComponentInfoModules.pickle"
deps = [
":modules_core_global_constructors_idls",
":modules_global_constructors_idls",
]
}
action("interfaces_info") {
script = "$bindings_scripts_dir/compute_interfaces_info_overall.py"
inputs = [
"$bindings_core_output_dir/InterfacesInfoCoreIndividual.pickle",
"$bindings_modules_output_dir/InterfacesInfoOverallIndividual.pickle",
]
outputs = [
"$bindings_modules_output_dir/InterfacesInfoOverall.pickle",
]
args = [
"--",
rebase_path("$bindings_core_output_dir/InterfacesInfoCoreIndividual.pickle",
root_build_dir),
rebase_path(
"$bindings_modules_output_dir/InterfacesInfoOverallIndividual.pickle",
root_build_dir),
rebase_path("$bindings_modules_output_dir/InterfacesInfoOverall.pickle",
root_build_dir),
]
public_deps = [
":interfaces_info_individual_modules",
"//third_party/blink/renderer/bindings/core:interfaces_info_individual_core",
]
}
compute_global_objects("modules_global_objects") {
sources = modules_idl_files
sources_generated = [ "$bindings_core_output_dir/GlobalObjectsCore.pickle" ]
output_file = "$bindings_modules_output_dir/GlobalObjectsModules.pickle"
deps = [
"//third_party/blink/renderer/bindings/core:core_global_objects",
]
}
generate_global_constructors("modules_core_global_constructors_idls") {
sources = core_idl_files + core_idl_with_modules_dependency_files
global_objects_file =
"$bindings_modules_output_dir/GlobalObjectsModules.pickle"
interfaces = modules_core_global_constructors_original_interfaces
basenames = modules_core_global_constructors_original_interface_basenames
component = "core"
output_dir = blink_modules_output_dir
deps = [
":modules_global_objects",
]
}
generate_global_constructors("modules_global_constructors_idls") {
sources = modules_idl_files
global_objects_file =
"$bindings_modules_output_dir/GlobalObjectsModules.pickle"
interfaces = modules_global_constructors_original_interfaces
basenames = modules_global_constructors_original_interface_basenames
component = "modules"
output_dir = blink_modules_output_dir
deps = [
":modules_global_objects",
]
}
# Compile the sources produced above. This will get linked into "modules".
source_set("generated") {
visibility = [ "//third_party/blink/renderer/modules:*" ]
sources = get_target_outputs(":event_modules") +
get_target_outputs(":event_modules_names") +
get_target_outputs(":event_target_modules_names")
configs += [
"//third_party/blink/renderer:config",
"//third_party/blink/renderer/modules:modules_implementation",
"//third_party/blink/renderer:non_test_config",
"//third_party/blink/renderer:inside_blink",
]
deps = [
":event_modules",
":event_modules_names",
":event_target_modules_names",
"//third_party/blink/renderer/core",
"//third_party/blink/renderer/platform/wtf",
"//v8",
]
}
generate_web_idl_collection("modules_web_idl_collection") {
sources = modules_definition_idl_files + modules_dependency_idl_files
output = "WebIdlCollectionForModules.pickle"
component = "modules"
output_dir = bindings_modules_output_dir
}