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") { ...@@ -36,7 +36,7 @@ mojom("mojom") {
public_deps = [ public_deps = [
"//mojo/public/mojom/base", "//mojo/public/mojom/base",
"//services/network/public/mojom", "//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", "//url/mojom:url_mojom_gurl",
] ]
......
...@@ -244,9 +244,7 @@ component("cpp_base") { ...@@ -244,9 +244,7 @@ component("cpp_base") {
":cookies_mojom_support", ":cookies_mojom_support",
":crash_keys", ":crash_keys",
":ip_address_mojom_support", ":ip_address_mojom_support",
"//services/network/public/mojom:data_pipe_interfaces", "//services/network/public/mojom:url_loader_base",
"//services/network/public/mojom:mutable_network_traffic_annotation_interface",
"//services/network/public/mojom:trust_tokens_interface",
"//third_party/webrtc_overrides:webrtc_component", "//third_party/webrtc_overrides:webrtc_component",
"//url/ipc:url_ipc", "//url/ipc:url_ipc",
"//url/mojom:url_mojom_gurl", "//url/mojom:url_mojom_gurl",
......
...@@ -146,47 +146,45 @@ mojom("mojom_network_isolation_key") { ...@@ -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 # which comes from the fact that the typemap for url_loader.mojom
# (ResourceRequestBody) uses these interfaces. # (ResourceRequest) depends on them.
mojom("data_pipe_interfaces") { mojom("url_loader_base") {
generate_java = true generate_java = true
sources = [ sources = [
"chunked_data_pipe_getter.mojom", "chunked_data_pipe_getter.mojom",
"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 public_deps = [
# //services/network, add the correct values for export_class_attribute / "//mojo/public/mojom/base",
# export_define / export_header here. Context in https://crrev.com/2225673002. "//url/mojom:url_mojom_origin",
]
if (!is_ios) { if (!is_ios) {
export_class_attribute_blink = "BLINK_PLATFORM_EXPORT" export_class_attribute_blink = "BLINK_PLATFORM_EXPORT"
export_define_blink = "BLINK_PLATFORM_IMPLEMENTATION=1" export_define_blink = "BLINK_PLATFORM_IMPLEMENTATION=1"
export_header_blink = "third_party/blink/public/platform/web_common.h" export_header_blink = "third_party/blink/public/platform/web_common.h"
} }
}
mojom("mutable_network_traffic_annotation_interface") { # Shared by cpp_typemaps and blink_cpp_typemaps.
generate_java = true shared_typemaps = [
sources = [ {
"mutable_network_traffic_annotation_tag.mojom", types = [
"mutable_partial_network_traffic_annotation_tag.mojom", {
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 = [ cpp_typemaps = [
mutable_network_traffic_annotation_tag_typemap,
{ {
types = [ types = [
{ {
...@@ -199,24 +197,9 @@ mojom("mutable_network_traffic_annotation_interface") { ...@@ -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, blink_cpp_typemaps = shared_typemaps
# 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"
}
} }
# This target is split from "mojom" target as the lazy serialization may # This target is split from "mojom" target as the lazy serialization may
...@@ -487,11 +470,9 @@ mojom("mojom") { ...@@ -487,11 +470,9 @@ mojom("mojom") {
public_deps = [ public_deps = [
":cookies_mojom", ":cookies_mojom",
":data_pipe_interfaces",
":mojom_ip_address", ":mojom_ip_address",
":mojom_network_isolation_key", ":mojom_network_isolation_key",
":mutable_network_traffic_annotation_interface", ":url_loader_base",
":trust_tokens_interface",
":websocket_mojom", ":websocket_mojom",
"//mojo/public/mojom/base", "//mojo/public/mojom/base",
"//services/proxy_resolver/public/mojom", "//services/proxy_resolver/public/mojom",
......
...@@ -211,8 +211,8 @@ mojom("mojom_platform") { ...@@ -211,8 +211,8 @@ mojom("mojom_platform") {
"//services/data_decoder/public/mojom:mojom_resource_snapshot_for_web_bundle", "//services/data_decoder/public/mojom:mojom_resource_snapshot_for_web_bundle",
"//services/device/public/mojom", "//services/device/public/mojom",
"//services/network/public/mojom", "//services/network/public/mojom",
"//services/network/public/mojom:data_pipe_interfaces",
"//services/network/public/mojom:mojom_ip_address", "//services/network/public/mojom:mojom_ip_address",
"//services/network/public/mojom:url_loader_base",
"//services/network/public/mojom:websocket_mojom", "//services/network/public/mojom:websocket_mojom",
"//services/service_manager/public/mojom", "//services/service_manager/public/mojom",
"//services/viz/public/mojom", "//services/viz/public/mojom",
...@@ -627,7 +627,7 @@ mojom("android_mojo_bindings") { ...@@ -627,7 +627,7 @@ mojom("android_mojo_bindings") {
sources += [ "remote_objects/remote_objects.mojom" ] sources += [ "remote_objects/remote_objects.mojom" ]
# Direct deps (instead of transitive deps) are necessary for java targets. # 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. # 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