naiveproxy/services/network/public/mojom/BUILD.gn

137 lines
4.3 KiB
Plaintext
Raw Normal View History

2018-12-10 05:59:24 +03:00
# Copyright 2017 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")
# These interfaces are put in their own target to avoid a circular dependency,
# which comes from the fact that the typemap for url_loader.mojom
# (ResourceRequestBody) uses these interfaces.
mojom("data_pipe_interfaces") {
sources = [
"chunked_data_pipe_getter.mojom",
"data_pipe_getter.mojom",
]
# TODO(crbug/598073): When moving the service implementation to
# //services/network, add the correct values for export_class_attribute /
# export_define / export_header here. Context in https://crrev.com/2225673002.
if (!is_ios) {
export_class_attribute_blink = "BLINK_PLATFORM_EXPORT"
export_define_blink = "BLINK_PLATFORM_IMPLEMENTATION=1"
export_header_blink = "third_party/blink/public/platform/web_common.h"
}
}
mojom("mutable_network_traffic_annotation_interface") {
sources = [
"mutable_network_traffic_annotation_tag.mojom",
"mutable_partial_network_traffic_annotation_tag.mojom",
]
}
# UDP socket interface relies on mojo.common.mojom.ReadOnlyBuffer, which is
# mapped to base::span<const uint8_t>. ReadOnlyBufffer doesn't yet work with
# lazy serialization, so this needs to be in a separate target that doesn't have
# support_lazy_serialization = true.
mojom("udp_socket_interface") {
sources = [
"udp_socket.mojom",
]
public_deps = [
":mutable_network_traffic_annotation_interface",
"//mojo/public/mojom/base:read_only_buffer",
"//net/interfaces:interfaces",
]
}
# This target is split from "mojom" target as the lazy serialization may
# cause problems. See https://crbug.com/822732.
mojom("websocket_mojom") {
sources = [
"network_param.mojom",
"websocket.mojom",
]
public_deps = [
"//url/mojom:url_mojom_gurl",
"//url/mojom:url_mojom_origin",
]
if (!is_ios) {
export_class_attribute_blink = "BLINK_PLATFORM_EXPORT"
export_define_blink = "BLINK_PLATFORM_IMPLEMENTATION=1"
export_header_blink = "third_party/blink/public/platform/web_common.h"
}
}
mojom("mojom") {
# URLLoader & URLLoaderFactory are used in-process in the browser when
# navigation uses URLLoader (NavigationMojoResponse) and in the renderer
# when Service Worker uses direct communication (S13nServiceWorker).
support_lazy_serialization = true
sources = [
"cookie_manager.mojom",
"cors.mojom",
"cors_origin_pattern.mojom",
"ct_log_info.mojom",
"digitally_signed.mojom",
"fetch_api.mojom",
"host_resolver.mojom",
"http_request_headers.mojom",
"network_change_manager.mojom",
"network_context.mojom",
"network_quality_estimator_manager.mojom",
"network_service.mojom",
"network_service_test.mojom",
"network_types.mojom",
"p2p.mojom",
"p2p_trusted.mojom",
"proxy_config.mojom",
"proxy_config_with_annotation.mojom",
"proxy_lookup_client.mojom",
"proxy_resolving_socket.mojom",
"request_context_frame_type.mojom",
"restricted_cookie_manager.mojom",
"signed_tree_head.mojom",
"ssl_config.mojom",
"tcp_socket.mojom",
"tls_socket.mojom",
"url_loader.mojom",
"url_loader_factory.mojom",
]
public_deps = [
":data_pipe_interfaces",
":mutable_network_traffic_annotation_interface",
":udp_socket_interface",
":websocket_mojom",
"//components/content_settings/core/common:mojo_bindings",
"//mojo/public/mojom/base",
"//mojo/public/mojom/base:read_only_buffer",
"//net/interfaces",
"//services/proxy_resolver/public/mojom",
"//url/mojom:url_mojom_gurl",
"//url/mojom:url_mojom_origin",
]
# TODO(crbug/598073): When moving the service implementation to
# //services/network, add the correct values for export_class_attribute /
# export_define / export_header here. Context in https://crrev.com/2225673002.
if (!is_ios) {
export_class_attribute_blink = "BLINK_PLATFORM_EXPORT"
export_define_blink = "BLINK_PLATFORM_IMPLEMENTATION=1"
export_header_blink = "third_party/blink/public/platform/web_common.h"
}
# This is only needed on desktop linux, but the defines make this difficult
# because IS_CHROMECAST is not available in build/build_config.h.
if (is_linux && !is_chromeos) {
enabled_features = [ "needs_crypt_config" ]
}
}