Commit e4b3dc63 authored by dpapad's avatar dpapad Committed by Commit Bot

WebUI: Move several grit() targets to subfolders.

These grit() targets traditionally were placed in c/b/r/BUILD.gn,
but it is more appropriate to move them to within the corresponding
WebUI subfolder.

In this CL only moving grit() targets for folders where
generate_grd() is used.

Bug: 1132403
Change-Id: I52c86feca0f20cc819240068a38e1c3d39b6acab
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2503189
Commit-Queue: Marc Treib <treib@chromium.org>
Reviewed-by: default avatarMarc Treib <treib@chromium.org>
Reviewed-by: default avatarJohn Lee <johntlee@chromium.org>
Auto-Submit: dpapad <dpapad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#821651}
parent 803e26b6
......@@ -1346,17 +1346,17 @@ group("extra_resources") {
if (!is_android) {
public_deps += [
"//chrome/browser/resources:bookmarks_resources",
"//chrome/browser/resources:commander_resources",
"//chrome/browser/resources:component_extension_resources",
"//chrome/browser/resources:dev_ui_paks",
"//chrome/browser/resources:downloads_resources",
"//chrome/browser/resources:gaia_auth_host_resources",
"//chrome/browser/resources:history_resources",
"//chrome/browser/resources:local_ntp_resources",
"//chrome/browser/resources:new_tab_page_resources",
"//chrome/browser/resources:read_later_resources",
"//chrome/browser/resources:settings_resources",
"//chrome/browser/resources/bookmarks:bookmarks_resources",
"//chrome/browser/resources/commander:commander_resources",
"//chrome/browser/resources/downloads:downloads_resources",
"//chrome/browser/resources/history:history_resources",
"//chrome/browser/resources/settings:settings_resources",
]
}
......@@ -1377,25 +1377,26 @@ group("extra_resources") {
}
if (is_linux || is_chromeos) {
public_deps += [ "//chrome/browser/resources:webui_js_exception_resources" ]
public_deps += [ "//chrome/browser/resources/webui_js_exception:webui_js_exception_resources" ]
}
if (!is_android && !is_chromeos) {
public_deps += [
"//chrome/browser/resources:profile_picker_resources",
"//chrome/browser/resources:welcome_resources",
"//chrome/browser/resources/signin/profile_picker:profile_picker_resources",
"//chrome/browser/resources/welcome:welcome_resources",
]
}
if (enable_extensions) {
public_deps += [
"//chrome/browser/resources:extensions_resources",
"//chrome/browser/resources:sync_file_system_internals_resources",
"//chrome/browser/resources/extensions:extensions_resources",
]
}
if (enable_print_preview) {
public_deps += [ "//chrome/browser/resources:print_preview_resources" ]
public_deps +=
[ "//chrome/browser/resources/print_preview:print_preview_resources" ]
}
if (enable_tab_search) {
......
......@@ -87,7 +87,7 @@ source_set("chromeos") {
"//chrome/browser/image_decoder",
"//chrome/browser/nearby_sharing/logging",
"//chrome/browser/resource_coordinator:tab_metrics_event_proto",
"//chrome/browser/resources:settings_resources_grit",
"//chrome/browser/resources/settings:settings_resources_grit",
"//chrome/browser/ui/webui/bluetooth_internals:mojo_bindings",
"//chrome/browser/ui/webui/chromeos/crostini_upgrader:mojo_bindings",
"//chrome/browser/ui/webui/settings/chromeos/constants:mojom",
......
This diff is collapsed.
......@@ -4,6 +4,7 @@
import("//chrome/common/features.gni")
import("//third_party/closure_compiler/compile_js.gni")
import("//tools/grit/grit_rule.gni")
import("//tools/grit/preprocess_grit.gni")
import("//tools/polymer/html_to_js.gni")
import("//ui/webui/resources/tools/generate_grd.gni")
......@@ -109,6 +110,31 @@ html_to_js("web_components") {
]
}
grit("bookmarks_resources") {
grit_flags = [
"-E",
"root_gen_dir=" + rebase_path(root_gen_dir, root_build_dir),
"-E",
"root_src_dir=" + rebase_path("//", root_build_dir),
]
defines = chrome_grit_defines
# These arguments are needed since the grd is generated at build time.
enable_input_discovery_for_gn_analyze = false
defines +=
[ "SHARED_INTERMEDIATE_DIR=" + rebase_path(root_gen_dir, root_build_dir) ]
source = "$target_gen_dir/bookmarks_resources.grd"
deps = [ ":build_grd" ]
outputs = [
"grit/bookmarks_resources.h",
"grit/bookmarks_resources_map.cc",
"grit/bookmarks_resources_map.h",
"bookmarks_resources.pak",
]
output_dir = "$root_gen_dir/chrome"
}
js_type_check("closure_compile") {
is_polymer3 = true
deps = [
......
......@@ -2,7 +2,9 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//chrome/common/features.gni")
import("//third_party/closure_compiler/compile_js.gni")
import("//tools/grit/grit_rule.gni")
import("//tools/grit/preprocess_grit.gni")
import("//tools/polymer/html_to_js.gni")
import("//ui/webui/resources/tools/generate_grd.gni")
......@@ -49,6 +51,30 @@ preprocess_grit("preprocess_generated") {
]
}
grit("commander_resources") {
grit_flags = [
"-E",
"root_gen_dir=" + rebase_path(root_gen_dir, root_build_dir),
"-E",
"root_src_dir=" + rebase_path("//", root_build_dir),
]
defines = chrome_grit_defines
# These arguments are needed since the grd is generated at build time.
enable_input_discovery_for_gn_analyze = false
defines +=
[ "SHARED_INTERMEDIATE_DIR=" + rebase_path(root_gen_dir, root_build_dir) ]
source = "$target_gen_dir/commander_resources.grd"
deps = [ ":build_grd" ]
outputs = [
"grit/commander_resources.h",
"grit/commander_resources_map.cc",
"grit/commander_resources_map.h",
"commander_resources.pak",
]
output_dir = "$root_gen_dir/chrome"
}
js_type_check("closure_compile") {
is_polymer3 = true
deps = [
......
......@@ -4,6 +4,7 @@
import("//chrome/common/features.gni")
import("//third_party/closure_compiler/compile_js.gni")
import("//tools/grit/grit_rule.gni")
import("//tools/grit/preprocess_grit.gni")
import("//tools/polymer/html_to_js.gni")
import("//ui/webui/resources/tools/generate_grd.gni")
......@@ -99,6 +100,31 @@ preprocess_grit("preprocess_mojo") {
in_files = [ "downloads.mojom-lite.js" ]
}
grit("downloads_resources") {
grit_flags = [
"-E",
"root_gen_dir=" + rebase_path(root_gen_dir, root_build_dir),
"-E",
"root_src_dir=" + rebase_path("//", root_build_dir),
]
defines = chrome_grit_defines
# These arguments are needed since the grd is generated at build time.
enable_input_discovery_for_gn_analyze = false
defines +=
[ "SHARED_INTERMEDIATE_DIR=" + rebase_path(root_gen_dir, root_build_dir) ]
source = "$target_gen_dir/downloads_resources.grd"
deps = [ ":build_grd" ]
outputs = [
"grit/downloads_resources.h",
"grit/downloads_resources_map.cc",
"grit/downloads_resources_map.h",
"downloads_resources.pak",
]
output_dir = "$root_gen_dir/chrome"
}
js_type_check("closure_compile") {
is_polymer3 = true
deps = [
......
......@@ -4,6 +4,7 @@
import("//chrome/common/features.gni")
import("//third_party/closure_compiler/compile_js.gni")
import("//tools/grit/grit_rule.gni")
import("//tools/grit/preprocess_grit.gni")
import("//tools/polymer/html_to_js.gni")
import("//ui/webui/resources/tools/generate_grd.gni")
......@@ -167,6 +168,31 @@ html_to_js("web_components_local") {
}
}
grit("extensions_resources") {
grit_flags = [
"-E",
"root_gen_dir=" + rebase_path(root_gen_dir, root_build_dir),
"-E",
"root_src_dir=" + rebase_path("//", root_build_dir),
]
defines = chrome_grit_defines
# These arguments are needed since the grd is generated at build time.
enable_input_discovery_for_gn_analyze = false
defines +=
[ "SHARED_INTERMEDIATE_DIR=" + rebase_path(root_gen_dir, root_build_dir) ]
source = "$target_gen_dir/extensions_resources.grd"
deps = [ ":build_grd" ]
outputs = [
"grit/extensions_resources.h",
"grit/extensions_resources_map.cc",
"grit/extensions_resources_map.h",
"extensions_resources.pak",
]
output_dir = "$root_gen_dir/chrome"
}
js_type_check("extensions_module_resources") {
is_polymer3 = true
deps = [
......
......@@ -4,6 +4,7 @@
import("//chrome/common/features.gni")
import("//third_party/closure_compiler/compile_js.gni")
import("//tools/grit/grit_rule.gni")
import("//tools/grit/preprocess_grit.gni")
import("//tools/polymer/html_to_js.gni")
import("//ui/webui/resources/tools/generate_grd.gni")
......@@ -102,6 +103,31 @@ preprocess_grit("preprocess_generated") {
]
}
grit("history_resources") {
grit_flags = [
"-E",
"root_gen_dir=" + rebase_path(root_gen_dir, root_build_dir),
"-E",
"root_src_dir=" + rebase_path("//", root_build_dir),
]
defines = chrome_grit_defines
# These arguments are needed since the grd is generated at build time.
enable_input_discovery_for_gn_analyze = false
defines +=
[ "SHARED_INTERMEDIATE_DIR=" + rebase_path(root_gen_dir, root_build_dir) ]
source = "$target_gen_dir/history_resources.grd"
deps = [ ":build_grd" ]
outputs = [
"grit/history_resources.h",
"grit/history_resources_map.cc",
"grit/history_resources_map.h",
"history_resources.pak",
]
output_dir = "$root_gen_dir/chrome"
}
js_type_check("closure_compile") {
is_polymer3 = true
deps = [
......
......@@ -4,6 +4,7 @@
import("//chrome/common/features.gni")
import("//third_party/closure_compiler/compile_js.gni")
import("//tools/grit/grit_rule.gni")
import("//tools/grit/preprocess_grit.gni")
import("//ui/webui/resources/tools/generate_grd.gni")
import("../optimize_webui.gni")
......@@ -187,6 +188,31 @@ preprocess_grit("preprocess_pdf_generated") {
]
}
grit("print_preview_resources") {
grit_flags = [
"-E",
"root_gen_dir=" + rebase_path(root_gen_dir, root_build_dir),
"-E",
"root_src_dir=" + rebase_path("//", root_build_dir),
]
defines = chrome_grit_defines
# These arguments are needed since the grd is generated at build time.
enable_input_discovery_for_gn_analyze = false
defines +=
[ "SHARED_INTERMEDIATE_DIR=" + rebase_path(root_gen_dir, root_build_dir) ]
source = "$target_gen_dir/print_preview_resources.grd"
deps = [ ":build_grd" ]
outputs = [
"grit/print_preview_resources.h",
"grit/print_preview_resources_map.cc",
"grit/print_preview_resources_map.h",
"print_preview_resources.pak",
]
output_dir = "$root_gen_dir/chrome"
}
group("closure_compile") {
deps = [
":print_preview_module_resources",
......
......@@ -4,6 +4,7 @@
import("//chrome/common/features.gni")
import("//third_party/closure_compiler/compile_js.gni")
import("//tools/grit/grit_rule.gni")
import("//tools/grit/preprocess_grit.gni")
import("//tools/polymer/html_to_js.gni")
import("//tools/polymer/polymer.gni")
......@@ -328,9 +329,34 @@ preprocess_grit("preprocess_generated") {
}
}
grit("settings_resources") {
grit_flags = [
"-E",
"root_gen_dir=" + rebase_path(root_gen_dir, root_build_dir),
"-E",
"root_src_dir=" + rebase_path("//", root_build_dir),
]
defines = chrome_grit_defines
# These arguments are needed since the grd is generated at build time.
enable_input_discovery_for_gn_analyze = false
defines +=
[ "SHARED_INTERMEDIATE_DIR=" + rebase_path(root_gen_dir, root_build_dir) ]
source = "$target_gen_dir/settings_resources.grd"
deps = [ ":build_grd" ]
outputs = [
"grit/settings_resources.h",
"grit/settings_resources_map.cc",
"grit/settings_resources_map.h",
"settings_resources.pak",
]
output_dir = "$root_gen_dir/chrome"
}
group("closure_compile") {
deps = [
":settings_resources",
":local_resources",
"a11y_page:closure_compile",
"about_page:closure_compile",
"appearance_page:closure_compile",
......@@ -351,7 +377,7 @@ group("closure_compile") {
}
}
js_type_check("settings_resources") {
js_type_check("local_resources") {
deps = [
":extension_control_browser_proxy",
":global_scroll_target_behavior",
......
......@@ -4,6 +4,7 @@
import("//chrome/common/features.gni")
import("//third_party/closure_compiler/compile_js.gni")
import("//tools/grit/grit_rule.gni")
import("//tools/grit/preprocess_grit.gni")
import("//tools/polymer/html_to_js.gni")
import("//ui/webui/resources/tools/generate_grd.gni")
......@@ -108,6 +109,31 @@ preprocess_grit("preprocess_generated") {
]
}
grit("profile_picker_resources") {
grit_flags = [
"-E",
"root_gen_dir=" + rebase_path(root_gen_dir, root_build_dir),
"-E",
"root_src_dir=" + rebase_path("//", root_build_dir),
]
defines = chrome_grit_defines
# These arguments are needed since the grd is generated at build time.
enable_input_discovery_for_gn_analyze = false
defines +=
[ "SHARED_INTERMEDIATE_DIR=" + rebase_path(root_gen_dir, root_build_dir) ]
source = "$target_gen_dir/profile_picker_resources.grd"
deps = [ ":build_grd" ]
outputs = [
"grit/profile_picker_resources.h",
"grit/profile_picker_resources_map.cc",
"grit/profile_picker_resources_map.h",
"profile_picker_resources.pak",
]
output_dir = "$root_gen_dir/chrome"
}
group("closure_compile") {
deps = [
":profile_picker_files",
......
......@@ -2,7 +2,9 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//chrome/common/features.gni")
import("//third_party/closure_compiler/compile_js.gni")
import("//tools/grit/grit_rule.gni")
import("//tools/grit/preprocess_grit.gni")
import("//tools/polymer/html_to_js.gni")
import("//ui/webui/resources/tools/generate_grd.gni")
......@@ -66,6 +68,31 @@ preprocess_grit("preprocess_generated") {
]
}
grit("tab_strip_resources") {
grit_flags = [
"-E",
"root_gen_dir=" + rebase_path(root_gen_dir, root_build_dir),
"-E",
"root_src_dir=" + rebase_path("//", root_build_dir),
]
defines = chrome_grit_defines
# These arguments are needed since the grd is generated at build time.
enable_input_discovery_for_gn_analyze = false
defines +=
[ "SHARED_INTERMEDIATE_DIR=" + rebase_path(root_gen_dir, root_build_dir) ]
source = "$target_gen_dir/tab_strip_resources.grd"
deps = [ ":build_grd" ]
outputs = [
"grit/tab_strip_resources.h",
"grit/tab_strip_resources_map.cc",
"grit/tab_strip_resources_map.h",
"tab_strip_resources.pak",
]
output_dir = "$root_gen_dir/chrome"
}
js_type_check("closure_compile") {
uses_js_modules = true
deps = [
......
......@@ -3,7 +3,9 @@
# found in the LICENSE file.
import("//chrome/browser/resources/optimize_webui.gni")
import("//chrome/common/features.gni")
import("//third_party/closure_compiler/compile_js.gni")
import("//tools/grit/grit_rule.gni")
import("//tools/grit/preprocess_grit.gni")
import("//ui/webui/resources/tools/generate_grd.gni")
import("//ui/webui/webui_features.gni")
......@@ -47,6 +49,31 @@ generate_grd("build_grd") {
out_grd = "$target_gen_dir/${grd_prefix}_resources.grd"
}
grit("webui_js_exception_resources") {
grit_flags = [
"-E",
"root_gen_dir=" + rebase_path(root_gen_dir, root_build_dir),
"-E",
"root_src_dir=" + rebase_path("//", root_build_dir),
]
defines = chrome_grit_defines
# These arguments are needed since the grd is generated at build time.
enable_input_discovery_for_gn_analyze = false
defines +=
[ "SHARED_INTERMEDIATE_DIR=" + rebase_path(root_gen_dir, root_build_dir) ]
source = "$target_gen_dir/webui_js_exception_resources.grd"
deps = [ ":build_grd" ]
outputs = [
"grit/webui_js_exception_resources.h",
"grit/webui_js_exception_resources_map.cc",
"grit/webui_js_exception_resources_map.h",
"webui_js_exception_resources.pak",
]
output_dir = "$root_gen_dir/chrome"
}
js_type_check("closure_compile") {
deps = [ ":webui_js_exception" ]
}
......
......@@ -2,7 +2,9 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//chrome/common/features.gni")
import("//third_party/closure_compiler/compile_js.gni")
import("//tools/grit/grit_rule.gni")
import("//tools/grit/preprocess_grit.gni")
import("//tools/polymer/html_to_js.gni")
import("//ui/webui/resources/tools/generate_grd.gni")
......@@ -80,6 +82,31 @@ preprocess_grit("preprocess_generated") {
]
}
grit("welcome_resources") {
grit_flags = [
"-E",
"root_gen_dir=" + rebase_path(root_gen_dir, root_build_dir),
"-E",
"root_src_dir=" + rebase_path("//", root_build_dir),
]
defines = chrome_grit_defines
# These arguments are needed since the grd is generated at build time.
enable_input_discovery_for_gn_analyze = false
defines +=
[ "SHARED_INTERMEDIATE_DIR=" + rebase_path(root_gen_dir, root_build_dir) ]
source = "$target_gen_dir/welcome_resources.grd"
deps = [ ":build_grd" ]
outputs = [
"grit/welcome_resources.h",
"grit/welcome_resources_map.cc",
"grit/welcome_resources_map.h",
"welcome_resources.pak",
]
output_dir = "$root_gen_dir/chrome"
}
group("closure_compile") {
deps = [
":welcome_files",
......
......@@ -4548,7 +4548,7 @@ static_library("ui") {
}
if (enable_webui_tab_strip) {
deps += [ "//chrome/browser/resources:tab_strip_resources" ]
deps += [ "//chrome/browser/resources/tab_strip:tab_strip_resources" ]
sources += [
"views/frame/webui_tab_strip_container_view.cc",
......
......@@ -148,17 +148,17 @@ template("chrome_extra_paks") {
]
deps += [
"//chrome/browser/media/kaleidoscope:kaleidoscope_resources",
"//chrome/browser/resources:bookmarks_resources",
"//chrome/browser/resources:commander_resources",
"//chrome/browser/resources:component_extension_resources",
"//chrome/browser/resources:dev_ui_paks",
"//chrome/browser/resources:downloads_resources",
"//chrome/browser/resources:gaia_auth_host_resources",
"//chrome/browser/resources:history_resources",
"//chrome/browser/resources:local_ntp_resources",
"//chrome/browser/resources:new_tab_page_resources",
"//chrome/browser/resources:read_later_resources",
"//chrome/browser/resources:settings_resources",
"//chrome/browser/resources/bookmarks:bookmarks_resources",
"//chrome/browser/resources/commander:commander_resources",
"//chrome/browser/resources/downloads:downloads_resources",
"//chrome/browser/resources/history:history_resources",
"//chrome/browser/resources/settings:settings_resources",
"//content/browser/devtools:devtools_resources",
"//headless:resources",
]
......@@ -228,7 +228,7 @@ template("chrome_extra_paks") {
}
if (is_linux || is_chromeos) {
sources += [ "$root_gen_dir/chrome/webui_js_exception_resources.pak" ]
deps += [ "//chrome/browser/resources:webui_js_exception_resources" ]
deps += [ "//chrome/browser/resources/webui_js_exception:webui_js_exception_resources" ]
}
if (!is_android && !is_chromeos) {
sources += [
......@@ -236,8 +236,8 @@ template("chrome_extra_paks") {
"$root_gen_dir/chrome/welcome_resources.pak",
]
deps += [
"//chrome/browser/resources:profile_picker_resources",
"//chrome/browser/resources:welcome_resources",
"//chrome/browser/resources/signin/profile_picker:profile_picker_resources",
"//chrome/browser/resources/welcome:welcome_resources",
]
}
if (enable_extensions) {
......@@ -248,14 +248,15 @@ template("chrome_extra_paks") {
"$root_gen_dir/extensions/extensions_resources.pak",
]
deps += [
"//chrome/browser/resources:extensions_resources",
"//chrome/browser/resources:sync_file_system_internals_resources",
"//chrome/browser/resources/extensions:extensions_resources",
"//extensions:extensions_resources",
]
}
if (enable_print_preview) {
sources += [ "$root_gen_dir/chrome/print_preview_resources.pak" ]
deps += [ "//chrome/browser/resources:print_preview_resources" ]
deps +=
[ "//chrome/browser/resources/print_preview:print_preview_resources" ]
}
if (enable_tab_search) {
sources += [ "$root_gen_dir/chrome/tab_search_resources.pak" ]
......@@ -263,7 +264,7 @@ template("chrome_extra_paks") {
}
if (enable_webui_tab_strip) {
sources += [ "$root_gen_dir/chrome/tab_strip_resources.pak" ]
deps += [ "//chrome/browser/resources:tab_strip_resources" ]
deps += [ "//chrome/browser/resources/tab_strip:tab_strip_resources" ]
}
}
}
......
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