naiveproxy/services/network/public/mojom/BUILD.gn
2018-08-11 05:35:24 +00:00

122 lines
3.8 KiB
Plaintext

# 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 = [
"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",
"ct_log_info.mojom",
"digitally_signed.mojom",
"fetch_api.mojom",
"http_request_headers.mojom",
"network_change_manager.mojom",
"network_context.mojom",
"network_param.mojom",
"network_service.mojom",
"network_service_test.mojom",
"network_types.mojom",
"proxy_config.mojom",
"proxy_config_with_annotation.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",
"//mojo/public/mojom/base",
"//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"
}
}