naiveproxy/chrome/browser/resources/settings/BUILD.gn
2018-08-14 22:19:20 +00:00

179 lines
4.4 KiB
Plaintext

# Copyright 2018 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("../optimize_webui.gni")
import("//chrome/common/features.gni")
import("//third_party/closure_compiler/compile_js.gni")
import("//tools/grit/grit_rule.gni")
import("//ui/webui/webui_features.gni")
if (optimize_webui) {
settings_pak_file = "settings_resources.pak"
unpak_folder = "settings_resources.unpak"
optimize_webui("build") {
host = "settings"
html_in_files = [
"settings.html",
"lazy_load.html",
]
html_out_files = [
"vulcanized.html",
"lazy_load.vulcanized.html",
]
html_out_files_polymer2 = [
"vulcanized.p2.html",
"lazy_load.vulcanized.p2.html",
]
insert_in_head = "<base href=\"chrome://settings\">"
input = rebase_path("$target_gen_dir/$unpak_folder", root_build_dir)
js_out_files = [
"crisper.js",
"lazy_load.crisper.js",
]
deps = [
":unpak",
]
}
unpak("unpak") {
pak_file = settings_pak_file
out_folder = unpak_folder
deps = [
":flattened_resources",
]
}
grit("flattened_resources") {
source = "settings_resources.grd"
# The .grd contains references to generated files.
source_is_generated = true
defines = chrome_grit_defines
outputs = [
"grit/settings_resources.h",
"grit/settings_resources_map.cc",
"grit/settings_resources_map.h",
settings_pak_file,
]
output_dir = "$root_gen_dir/chrome/browser/resources/settings"
}
}
group("closure_compile") {
deps = [
":settings_resources",
"a11y_page:closure_compile",
"about_page:closure_compile",
"android_apps_page:closure_compile",
"animation:closure_compile",
"appearance_page:closure_compile",
"basic_page:closure_compile",
"bluetooth_page:closure_compile",
"change_password_page:closure_compile",
"chrome_cleanup_page:closure_compile",
"clear_browsing_data_dialog:closure_compile",
"controls:closure_compile",
"date_time_page:closure_compile",
"default_browser_page:closure_compile",
"device_page:closure_compile",
"downloads_page:closure_compile",
"incompatible_applications_page:closure_compile",
"internet_page:closure_compile",
"languages_page:closure_compile",
"multidevice_page:closure_compile",
"on_startup_page:closure_compile",
"passwords_and_forms_page:closure_compile",
"people_page:closure_compile",
"prefs:closure_compile",
"printing_page:closure_compile",
"privacy_page:closure_compile",
"reset_page:closure_compile",
"search_engines_page:closure_compile",
"search_page:closure_compile",
"settings_main:closure_compile",
"settings_menu:closure_compile",
"settings_page:closure_compile",
"settings_ui:closure_compile",
"site_settings:closure_compile",
"site_settings_page:closure_compile",
"system_page:closure_compile",
]
}
js_type_check("settings_resources") {
deps = [
":extension_control_browser_proxy",
":find_shortcut_behavior",
":focus_row_behavior",
":global_scroll_target_behavior",
":lifetime_browser_proxy",
":page_visibility",
":route",
":search_settings",
]
}
js_library("extension_control_browser_proxy") {
deps = [
"//ui/webui/resources/js:assert",
"//ui/webui/resources/js:cr",
]
externs_list = [ "$externs_path/chrome_send.js" ]
}
js_library("find_shortcut_behavior") {
deps = [
"//ui/webui/resources/js:assert",
"//ui/webui/resources/js:cr",
"//ui/webui/resources/js/cr/ui:command",
]
}
js_library("focus_row_behavior") {
deps = [
"//ui/webui/resources/js/cr/ui:focus_row",
]
}
js_library("global_scroll_target_behavior") {
deps = [
":route",
"//ui/webui/resources/js:cr",
]
}
js_library("lifetime_browser_proxy") {
deps = [
"//ui/webui/resources/js:cr",
]
externs_list = [ "$externs_path/chrome_send.js" ]
}
js_library("route") {
deps = [
":page_visibility",
"//ui/webui/resources/js:cr",
"//ui/webui/resources/js:load_time_data",
]
externs_list = [ "$externs_path/metrics_private.js" ]
}
js_library("page_visibility") {
deps = [
"//ui/webui/resources/js:cr",
"//ui/webui/resources/js:load_time_data",
]
}
js_library("search_settings") {
deps = [
"//ui/webui/resources/js:cr",
"//ui/webui/resources/js:search_highlight_utils",
]
}