| # Copyright 2014 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("//build/buildflag_header.gni") |
| import("//build/config/nacl/config.gni") |
| import("//tools/ipc_fuzzer/ipc_fuzzer.gni") |
| |
| declare_args() { |
| enable_mojo_tracing = false |
| |
| # enable_random_mojo_delays starts a task runner that periodically pauses |
| # random Mojo bindings and later resumes them, in order to test whether parts |
| # of the code implicitly rely on FIFO processing of messages sent on different |
| # message pipes (which they should not). |
| enable_random_mojo_delays = false |
| } |
| |
| buildflag_header("mojo_buildflags") { |
| header = "mojo_buildflags.h" |
| |
| flags = [ |
| "MOJO_TRACE_ENABLED=$enable_mojo_tracing", |
| "MOJO_RANDOM_DELAYS_ENABLED=$enable_random_mojo_delays", |
| ] |
| } |
| |
| # Headers and sources which generated bindings can depend upon. No need for |
| # other targets to depend on this directly: just use the "bindings" target. |
| component("bindings_base") { |
| sources = [ |
| "array_data_view.h", |
| "array_traits.h", |
| "array_traits_span.h", |
| "array_traits_stl.h", |
| "associated_group.h", |
| "associated_group_controller.h", |
| "clone_traits.h", |
| "connection_group.cc", |
| "connection_group.h", |
| "deprecated_interface_types_forward.h", |
| "disconnect_reason.h", |
| "enum_traits.h", |
| "enum_utils.h", |
| "equals_traits.h", |
| "features.cc", |
| "features.h", |
| "interface_data_view.h", |
| "interface_id.h", |
| "lib/array_internal.cc", |
| "lib/array_internal.h", |
| "lib/array_serialization.h", |
| "lib/associated_group.cc", |
| "lib/associated_group_controller.cc", |
| "lib/bindings_internal.h", |
| "lib/buffer.cc", |
| "lib/buffer.h", |
| "lib/fixed_buffer.cc", |
| "lib/fixed_buffer.h", |
| "lib/handle_serialization.h", |
| "lib/hash_util.h", |
| "lib/map_data_internal.h", |
| "lib/map_serialization.h", |
| "lib/may_auto_lock.h", |
| "lib/message.cc", |
| "lib/message_header_validator.cc", |
| "lib/message_internal.cc", |
| "lib/message_internal.h", |
| "lib/pending_receiver_state.cc", |
| "lib/pending_receiver_state.h", |
| "lib/pending_remote_state.cc", |
| "lib/pending_remote_state.h", |
| "lib/scoped_interface_endpoint_handle.cc", |
| "lib/serialization.h", |
| "lib/serialization_context.cc", |
| "lib/serialization_context.h", |
| "lib/serialization_forward.h", |
| "lib/serialization_util.h", |
| "lib/string_serialization.h", |
| "lib/template_util.h", |
| "lib/tracing_helper.h", |
| "lib/unserialized_message_context.cc", |
| "lib/unserialized_message_context.h", |
| "lib/validate_params.h", |
| "lib/validation_context.cc", |
| "lib/validation_context.h", |
| "lib/validation_errors.cc", |
| "lib/validation_errors.h", |
| "lib/validation_util.cc", |
| "lib/validation_util.h", |
| "map_data_view.h", |
| "map_traits.h", |
| "map_traits_flat_map.h", |
| "map_traits_stl.h", |
| "message.h", |
| "message_header_validator.h", |
| "scoped_interface_endpoint_handle.h", |
| "string_data_view.h", |
| "string_traits.h", |
| "string_traits_stl.h", |
| "string_traits_string_piece.h", |
| "struct_forward.h", |
| "struct_ptr.h", |
| "struct_traits.h", |
| "type_converter.h", |
| "union_traits.h", |
| ] |
| |
| defines = [ "IS_MOJO_CPP_BINDINGS_BASE_IMPL" ] |
| |
| public_deps = [ |
| ":mojo_buildflags", |
| "//base", |
| "//mojo/public/cpp/system", |
| ] |
| |
| if (enable_ipc_fuzzer) { |
| all_dependent_configs = [ "//tools/ipc_fuzzer:ipc_fuzzer_config" ] |
| } |
| } |
| |
| component("bindings") { |
| sources = [ |
| "associated_binding.h", |
| "associated_binding_set.h", |
| "associated_interface_ptr.h", |
| "associated_interface_ptr_info.h", |
| "associated_interface_request.h", |
| "associated_receiver.h", |
| "associated_receiver_set.h", |
| "associated_remote.h", |
| "binding.h", |
| "binding_set.h", |
| "callback_helpers.h", |
| "connection_error_callback.h", |
| "connector.h", |
| "generic_pending_receiver.cc", |
| "generic_pending_receiver.h", |
| "interface_endpoint_client.h", |
| "interface_endpoint_controller.h", |
| "interface_ptr.h", |
| "interface_ptr_info.h", |
| "interface_ptr_set.h", |
| "interface_request.h", |
| "lib/associated_binding.cc", |
| "lib/associated_interface_ptr.cc", |
| "lib/associated_interface_ptr_state.cc", |
| "lib/associated_interface_ptr_state.h", |
| "lib/binding_state.cc", |
| "lib/binding_state.h", |
| "lib/connector.cc", |
| "lib/control_message_handler.cc", |
| "lib/control_message_handler.h", |
| "lib/control_message_proxy.cc", |
| "lib/control_message_proxy.h", |
| "lib/generated_code_util.cc", |
| "lib/generated_code_util.h", |
| "lib/interface_endpoint_client.cc", |
| "lib/interface_ptr_state.cc", |
| "lib/interface_ptr_state.h", |
| "lib/interface_serialization.h", |
| "lib/message_dispatcher.cc", |
| "lib/multiplex_router.cc", |
| "lib/multiplex_router.h", |
| "lib/native_enum_data.h", |
| "lib/native_enum_serialization.h", |
| "lib/native_struct_serialization.cc", |
| "lib/native_struct_serialization.h", |
| "lib/pipe_control_message_handler.cc", |
| "lib/pipe_control_message_proxy.cc", |
| "lib/sequence_local_sync_event_watcher.cc", |
| "lib/sync_call_restrictions.cc", |
| "lib/sync_event_watcher.cc", |
| "lib/sync_handle_registry.cc", |
| "lib/sync_handle_watcher.cc", |
| "lib/task_runner_helper.cc", |
| "lib/task_runner_helper.h", |
| "message_dispatcher.h", |
| "native_enum.h", |
| "pending_associated_receiver.h", |
| "pending_associated_remote.h", |
| "pending_receiver.h", |
| "pending_remote.h", |
| "pipe_control_message_handler.h", |
| "pipe_control_message_handler_delegate.h", |
| "pipe_control_message_proxy.h", |
| "raw_ptr_impl_ref_traits.h", |
| "receiver.h", |
| "receiver_set.h", |
| "remote.h", |
| "remote_set.h", |
| "self_owned_associated_receiver.h", |
| "self_owned_receiver.h", |
| "sequence_local_sync_event_watcher.h", |
| "service_factory.cc", |
| "service_factory.h", |
| "shared_associated_remote.h", |
| "shared_remote.h", |
| "strong_associated_binding.h", |
| "strong_binding.h", |
| "strong_binding_set.h", |
| "sync_call_restrictions.h", |
| "sync_event_watcher.h", |
| "sync_handle_registry.h", |
| "sync_handle_watcher.h", |
| "thread_safe_forwarder_base.cc", |
| "thread_safe_forwarder_base.h", |
| "thread_safe_interface_ptr.h", |
| "unique_associated_receiver_set.h", |
| "unique_ptr_impl_ref_traits.h", |
| "unique_receiver_set.h", |
| ] |
| |
| if (enable_random_mojo_delays) { |
| sources += [ |
| "lib/test_random_mojo_delays.cc", |
| "lib/test_random_mojo_delays.h", |
| ] |
| } |
| |
| if (enable_ipc_fuzzer && !is_nacl_nonsfi) { |
| sources += [ |
| "lib/message_dumper.cc", |
| "message_dumper.h", |
| ] |
| } |
| |
| public_deps = [ |
| ":bindings_base", |
| ":struct_traits", |
| "//base", |
| "//base/util/type_safety", |
| "//ipc:message_support", |
| "//ipc:param_traits", |
| "//mojo/public/cpp/system", |
| "//mojo/public/interfaces/bindings", |
| ] |
| |
| deps = [ |
| "//ipc:native_handle_type_converters", |
| ] |
| |
| defines = [ "IS_MOJO_CPP_BINDINGS_IMPL" ] |
| } |
| |
| source_set("struct_traits") { |
| sources = [ |
| "array_traits.h", |
| "enum_traits.h", |
| "lib/template_util.h", |
| "map_traits.h", |
| "string_traits.h", |
| "struct_traits.h", |
| "union_traits.h", |
| ] |
| } |
| |
| if (!is_ios) { |
| # TODO(yzshen): crbug.com/617718 Consider moving this into blink. |
| source_set("wtf_support") { |
| sources = [ |
| "array_traits_web_vector.h", |
| "array_traits_wtf_vector.h", |
| "lib/string_traits_wtf.cc", |
| "lib/wtf_clone_equals_util.h", |
| "lib/wtf_hash_util.h", |
| "lib/wtf_serialization.h", |
| "map_traits_wtf_hash_map.h", |
| "string_traits_wtf.h", |
| ] |
| |
| public_deps = [ |
| ":bindings", |
| "//third_party/blink/public:blink_headers", |
| "//third_party/blink/renderer/platform:platform_export", |
| "//third_party/blink/renderer/platform/wtf", |
| ] |
| |
| public_configs = [ "//third_party/blink/renderer:config" ] |
| } |
| } |