Commit b094240a authored by Titouan Rigoudy's avatar Titouan Rigoudy Committed by Commit Bot

Consolidate url_loader typemap deps in BUILD.gn.

This reduces duplication a bit and provides a clear place to add new
mojom dependencies of ResourceRequest.

Bug: chromium:1124346
Change-Id: Id16435d8e5c5eb6318b4f0a4e9e1aec4ebbb99d0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2401471Reviewed-by: default avatarKinuko Yasuda <kinuko@chromium.org>
Reviewed-by: default avatarReilly Grant <reillyg@chromium.org>
Commit-Queue: Titouan Rigoudy <titouan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#806971}
parent a0751c83
......@@ -36,7 +36,7 @@ mojom("mojom") {
public_deps = [
"//mojo/public/mojom/base",
"//services/network/public/mojom",
"//services/network/public/mojom:mutable_network_traffic_annotation_interface",
"//services/network/public/mojom:url_loader_base",
"//url/mojom:url_mojom_gurl",
]
......
......@@ -244,9 +244,7 @@ component("cpp_base") {
":cookies_mojom_support",
":crash_keys",
":ip_address_mojom_support",
"//services/network/public/mojom:data_pipe_interfaces",
"//services/network/public/mojom:mutable_network_traffic_annotation_interface",
"//services/network/public/mojom:trust_tokens_interface",
"//services/network/public/mojom:url_loader_base",
"//third_party/webrtc_overrides:webrtc_component",
"//url/ipc:url_ipc",
"//url/mojom:url_mojom_gurl",
......
......@@ -146,47 +146,45 @@ mojom("mojom_network_isolation_key") {
]
}
# These interfaces are put in their own target to avoid a circular dependency,
# These .mojom files 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") {
# (ResourceRequest) depends on them.
mojom("url_loader_base") {
generate_java = true
sources = [
"chunked_data_pipe_getter.mojom",
"data_pipe_getter.mojom",
"mutable_network_traffic_annotation_tag.mojom",
"mutable_partial_network_traffic_annotation_tag.mojom",
"trust_tokens.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.
public_deps = [
"//mojo/public/mojom/base",
"//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("mutable_network_traffic_annotation_interface") {
generate_java = true
sources = [
"mutable_network_traffic_annotation_tag.mojom",
"mutable_partial_network_traffic_annotation_tag.mojom",
# Shared by cpp_typemaps and blink_cpp_typemaps.
shared_typemaps = [
{
types = [
{
mojom = "network.mojom.MutableNetworkTrafficAnnotationTag"
cpp = "::net::MutableNetworkTrafficAnnotationTag"
},
]
traits_headers = [ "//services/network/public/cpp/mutable_network_traffic_annotation_tag_mojom_traits.h" ]
traits_public_deps = [ "//net/traffic_annotation" ]
},
]
mutable_network_traffic_annotation_tag_typemap = {
types = [
{
mojom = "network.mojom.MutableNetworkTrafficAnnotationTag"
cpp = "::net::MutableNetworkTrafficAnnotationTag"
},
]
traits_headers = [ "//services/network/public/cpp/mutable_network_traffic_annotation_tag_mojom_traits.h" ]
traits_public_deps = [ "//net/traffic_annotation" ]
}
cpp_typemaps = [
mutable_network_traffic_annotation_tag_typemap,
{
types = [
{
......@@ -199,24 +197,9 @@ mojom("mutable_network_traffic_annotation_interface") {
},
]
blink_cpp_typemaps = [ mutable_network_traffic_annotation_tag_typemap ]
}
cpp_typemaps += shared_typemaps
# 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("trust_tokens_interface") {
generate_java = true
sources = [ "trust_tokens.mojom" ]
public_deps = [
"//mojo/public/mojom/base",
"//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"
}
blink_cpp_typemaps = shared_typemaps
}
# This target is split from "mojom" target as the lazy serialization may
......@@ -487,11 +470,9 @@ mojom("mojom") {
public_deps = [
":cookies_mojom",
":data_pipe_interfaces",
":mojom_ip_address",
":mojom_network_isolation_key",
":mutable_network_traffic_annotation_interface",
":trust_tokens_interface",
":url_loader_base",
":websocket_mojom",
"//mojo/public/mojom/base",
"//services/proxy_resolver/public/mojom",
......
......@@ -211,8 +211,8 @@ mojom("mojom_platform") {
"//services/data_decoder/public/mojom:mojom_resource_snapshot_for_web_bundle",
"//services/device/public/mojom",
"//services/network/public/mojom",
"//services/network/public/mojom:data_pipe_interfaces",
"//services/network/public/mojom:mojom_ip_address",
"//services/network/public/mojom:url_loader_base",
"//services/network/public/mojom:websocket_mojom",
"//services/service_manager/public/mojom",
"//services/viz/public/mojom",
......@@ -627,7 +627,7 @@ mojom("android_mojo_bindings") {
sources += [ "remote_objects/remote_objects.mojom" ]
# Direct deps (instead of transitive deps) are necessary for java targets.
public_deps += [ "//services/network/public/mojom:data_pipe_interfaces" ]
public_deps += [ "//services/network/public/mojom:url_loader_base" ]
}
# This Android unhandled-tap feature uses another mojo source, add it in.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment