blob: 2b2f09eb2c587e9746ce4b54cdef5ae0b8b80995 [file] [log] [blame]
# 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("//third_party/closure_compiler/compile_js.gni")
import("//tools/polymer/html_to_js.gni")
import("//tools/polymer/polymer.gni")
import("//ui/webui/resources/tools/js_modulizer.gni")
import("../settings.gni")
js_type_check("closure_compile") {
deps = [
":personalization_options",
":privacy_page_browser_proxy",
]
}
js_library("personalization_options") {
deps = [
":privacy_page_browser_proxy",
"..:router",
"../controls:settings_toggle_button",
"../people_page:signout_dialog",
"../people_page:sync_browser_proxy",
"../prefs:prefs_behavior",
"//ui/webui/resources/js:load_time_data",
"//ui/webui/resources/js:web_ui_listener_behavior",
]
externs_list = [ "$externs_path/settings_private.js" ]
}
js_library("privacy_page_browser_proxy") {
deps = [
"..:lifetime_browser_proxy",
"//ui/webui/resources/js:cr",
]
externs_list = [ "$externs_path/chrome_send.js" ]
}
js_type_check("closure_compile_module") {
is_polymer3 = true
closure_flags = settings_closure_flags
deps = [
":collapse_radio_button",
":cookies_page",
":disable_safebrowsing_dialog",
":do_not_track_toggle",
":personalization_options.m",
":privacy_page",
":privacy_page_browser_proxy.m",
":secure_dns",
":secure_dns_input",
":security_keys_bio_enroll_dialog",
":security_keys_browser_proxy",
":security_keys_credential_management_dialog",
":security_keys_pin_field",
":security_keys_reset_dialog",
":security_keys_set_pin_dialog",
":security_keys_subpage",
":security_page",
]
}
js_library("cookies_page") {
deps = [
":collapse_radio_button",
":do_not_track_toggle",
"..:metrics_browser_proxy",
"..:route",
"..:router.m",
"../controls:settings_toggle_button.m",
"../prefs:prefs_behavior.m",
"../site_settings:site_list",
"../site_settings:site_settings_prefs_browser_proxy",
"//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled",
"//ui/webui/resources/js:assert.m",
"//ui/webui/resources/js:web_ui_listener_behavior.m",
]
}
js_library("collapse_radio_button") {
deps = [
"//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled",
"//ui/webui/resources/cr_elements/cr_radio_button:cr_radio_button_behavior.m",
"//ui/webui/resources/cr_elements/policy:cr_policy_indicator_behavior.m",
]
}
js_library("secure_dns") {
deps = [
":privacy_page_browser_proxy.m",
"..:i18n_setup",
"../prefs:prefs_behavior.m",
"//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled",
"//ui/webui/resources/js:web_ui_listener_behavior.m",
]
}
js_library("secure_dns_input") {
deps = [
":privacy_page_browser_proxy.m",
"..:i18n_setup",
"//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled",
]
}
js_library("disable_safebrowsing_dialog") {
deps = [
"//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled",
"//ui/webui/resources/cr_elements/cr_dialog:cr_dialog.m",
]
}
js_library("do_not_track_toggle") {
deps = [
"..:metrics_browser_proxy",
"../controls:settings_toggle_button.m",
"//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled",
"//ui/webui/resources/js/cr/ui:focus_without_ink.m",
]
}
js_library("personalization_options.m") {
sources = [ "$root_gen_dir/chrome/browser/resources/settings/privacy_page/personalization_options.m.js" ]
deps = [
":privacy_page_browser_proxy.m",
"..:i18n_setup",
"..:lifetime_browser_proxy.m",
"../controls:settings_toggle_button.m",
"../people_page:signout_dialog.m",
"../people_page:sync_browser_proxy.m",
"../prefs:prefs_behavior.m",
"//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled",
"//ui/webui/resources/js:web_ui_listener_behavior.m",
]
extra_deps = [ ":personalization_options_module" ]
}
js_library("privacy_page") {
deps = [
":privacy_page_browser_proxy.m",
"..:hats_browser_proxy",
"..:i18n_setup",
"..:metrics_browser_proxy",
"..:page_visibility",
"..:route",
"..:router.m",
"../controls:settings_toggle_button.m",
"../people_page:sync_browser_proxy.m",
"../prefs:prefs_behavior.m",
"../site_settings:constants",
"../site_settings:site_data_details_subpage",
"../site_settings:site_settings_prefs_browser_proxy",
"//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled",
"//ui/webui/resources/js:assert.m",
"//ui/webui/resources/js:i18n_behavior.m",
"//ui/webui/resources/js:web_ui_listener_behavior.m",
"//ui/webui/resources/js/cr/ui:focus_without_ink.m",
]
}
js_library("privacy_page_browser_proxy.m") {
sources = [ "$root_gen_dir/chrome/browser/resources/settings/privacy_page/privacy_page_browser_proxy.m.js" ]
deps = [ "//ui/webui/resources/js:cr.m" ]
extra_deps = [ ":modulize" ]
}
js_library("security_keys_bio_enroll_dialog") {
deps = [
":security_keys_browser_proxy",
":security_keys_pin_field",
"//third_party/polymer/v3_0/components-chromium/iron-a11y-announcer",
"//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled",
"//ui/webui/resources/cr_elements/cr_fingerprint:cr_fingerprint_progress_arc.m",
"//ui/webui/resources/js:assert.m",
"//ui/webui/resources/js:i18n_behavior.m",
"//ui/webui/resources/js:web_ui_listener_behavior.m",
]
}
js_library("security_keys_browser_proxy") {
deps = [ "//ui/webui/resources/js:cr.m" ]
}
js_library("security_keys_credential_management_dialog") {
deps = [
":security_keys_browser_proxy",
":security_keys_pin_field",
"//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled",
"//ui/webui/resources/js:assert.m",
"//ui/webui/resources/js:i18n_behavior.m",
"//ui/webui/resources/js:web_ui_listener_behavior.m",
]
}
js_library("security_keys_pin_field") {
deps = [
"//third_party/polymer/v3_0/components-chromium/iron-a11y-announcer",
"//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled",
"//ui/webui/resources/js:i18n_behavior.m",
]
}
js_library("security_keys_reset_dialog") {
deps = [
":security_keys_browser_proxy",
"//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled",
"//ui/webui/resources/js:i18n_behavior.m",
]
}
js_library("security_keys_set_pin_dialog") {
deps = [
":security_keys_browser_proxy",
"//third_party/polymer/v3_0/components-chromium/iron-a11y-announcer",
"//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled",
"//ui/webui/resources/js:i18n_behavior.m",
"//ui/webui/resources/js:plural_string_proxy",
]
}
js_library("security_keys_subpage") {
deps = [
"..:i18n_setup",
"//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled",
"//ui/webui/resources/js:assert.m",
]
}
js_library("security_page") {
deps = [
":disable_safebrowsing_dialog",
":privacy_page_browser_proxy.m",
"..:i18n_setup",
"..:metrics_browser_proxy",
"..:route",
"..:router.m",
"../people_page:sync_browser_proxy.m",
"../prefs:prefs_behavior.m",
"//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled",
"//ui/webui/resources/js:assert.m",
"//ui/webui/resources/js/cr/ui:focus_without_ink.m",
]
}
group("polymer3_elements") {
public_deps = [
":modulize",
":personalization_options_module",
":v3_ready_elements",
]
}
html_to_js("v3_ready_elements") {
js_files = [
"collapse_radio_button.js",
"cookies_page.js",
"disable_safebrowsing_dialog.js",
"do_not_track_toggle.js",
"privacy_page.js",
"secure_dns.js",
"secure_dns_input.js",
"security_keys_bio_enroll_dialog.js",
"security_keys_credential_management_dialog.js",
"security_keys_pin_field.js",
"security_keys_reset_dialog.js",
"security_keys_set_pin_dialog.js",
"security_keys_subpage.js",
"security_page.js",
]
}
polymer_modulizer("personalization_options") {
js_file = "personalization_options.js"
html_file = "personalization_options.html"
html_type = "dom-module"
namespace_rewrites = settings_namespace_rewrites
migrated_imports = settings_migrated_imports
auto_imports = settings_auto_imports + [
"chrome/browser/resources/settings/privacy_page/privacy_page_browser_proxy.html|PrivacyPageBrowserProxy,PrivacyPageBrowserProxyImpl,MetricsReporting",
"chrome/browser/resources/settings/people_page/sync_browser_proxy.html|StatusAction,SyncStatus",
"chrome/browser/resources/settings/lifetime_browser_proxy.html|LifetimeBrowserProxyImpl",
]
}
js_modulizer("modulize") {
input_files = [ "privacy_page_browser_proxy.js" ]
namespace_rewrites = settings_namespace_rewrites
}