| # 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/polymer.gni") |
| import("//ui/webui/resources/tools/js_modulizer.gni") |
| import("../settings.gni") |
| |
| js_type_check("closure_compile") { |
| deps = [ |
| ":collapse_radio_button", |
| ":cookies_page", |
| ":do_not_track_toggle", |
| ":passwords_leak_detection_toggle", |
| ":personalization_options", |
| ":privacy_page", |
| ":privacy_page_browser_proxy", |
| ":secure_dns", |
| ":secure_dns_input", |
| ":security_keys_bio_enroll_dialog", |
| ":security_keys_credential_management_dialog", |
| ":security_keys_reset_dialog", |
| ":security_keys_set_pin_dialog", |
| ":security_keys_subpage", |
| ":security_page", |
| ] |
| } |
| |
| js_library("collapse_radio_button") { |
| deps = [ |
| "//ui/webui/resources/cr_elements/cr_radio_button:cr_radio_button_behavior", |
| "//ui/webui/resources/cr_elements/policy:cr_policy_indicator", |
| ] |
| } |
| |
| js_library("cookies_page") { |
| deps = [ |
| "..:metrics_browser_proxy", |
| "..:route", |
| "..:router", |
| "../prefs:prefs_behavior", |
| "../site_settings:constants", |
| "../site_settings:site_settings_prefs_browser_proxy", |
| "//ui/webui/resources/js:assert", |
| "//ui/webui/resources/js:load_time_data", |
| "//ui/webui/resources/js:web_ui_listener_behavior", |
| "//ui/webui/resources/js/cr/ui:focus_without_ink", |
| ] |
| } |
| |
| js_library("do_not_track_toggle") { |
| deps = [ |
| "..:metrics_browser_proxy", |
| "../controls:settings_toggle_button", |
| "//ui/webui/resources/js/cr/ui:focus_without_ink", |
| ] |
| } |
| |
| js_library("personalization_options") { |
| deps = [ |
| ":privacy_page_browser_proxy", |
| "..:page_visibility", |
| "..:router", |
| "../controls:settings_toggle_button", |
| "../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("passwords_leak_detection_toggle") { |
| deps = [ |
| "../people_page:sync_browser_proxy", |
| "../prefs:prefs_behavior", |
| "//ui/webui/resources/js:i18n_behavior", |
| "//ui/webui/resources/js:load_time_data", |
| "//ui/webui/resources/js:web_ui_listener_behavior", |
| ] |
| } |
| |
| js_library("privacy_page_browser_proxy") { |
| deps = [ |
| "..:lifetime_browser_proxy", |
| "//ui/webui/resources/js:cr", |
| ] |
| externs_list = [ "$externs_path/chrome_send.js" ] |
| } |
| |
| js_library("privacy_page") { |
| deps = [ |
| ":privacy_page_browser_proxy", |
| "..:hats_browser_proxy", |
| "..:metrics_browser_proxy", |
| "..:page_visibility", |
| "..:route", |
| "..:router", |
| "../controls:settings_toggle_button", |
| "../people_page:signout_dialog", |
| "../people_page:sync_browser_proxy", |
| "../settings_page:settings_animated_pages", |
| "../site_settings:constants", |
| "../site_settings:site_data_details_subpage", |
| "../site_settings:site_settings_prefs_browser_proxy", |
| "//ui/webui/resources/js:assert", |
| "//ui/webui/resources/js:i18n_behavior", |
| "//ui/webui/resources/js:web_ui_listener_behavior", |
| "//ui/webui/resources/js/cr/ui:focus_without_ink", |
| ] |
| externs_list = [ "$externs_path/settings_private.js" ] |
| } |
| |
| js_library("secure_dns") { |
| deps = [ |
| ":privacy_page_browser_proxy", |
| "../prefs:prefs_behavior", |
| "//ui/webui/resources/js:assert", |
| "//ui/webui/resources/js:load_time_data", |
| "//ui/webui/resources/js:web_ui_listener_behavior", |
| ] |
| externs_list = [ "$externs_path/settings_private.js" ] |
| } |
| |
| js_library("secure_dns_input") { |
| deps = [ |
| ":privacy_page_browser_proxy", |
| "//ui/webui/resources/js:load_time_data", |
| ] |
| externs_list = [ "$externs_path/settings_private.js" ] |
| } |
| |
| js_library("security_keys_browser_proxy") { |
| deps = [ "//ui/webui/resources/js:cr" ] |
| externs_list = [ "$externs_path/chrome_send.js" ] |
| } |
| |
| js_library("security_keys_subpage") { |
| deps = [ |
| ":security_keys_browser_proxy", |
| "..:router", |
| "../settings_page:settings_animated_pages", |
| "//ui/webui/resources/js:i18n_behavior", |
| ] |
| externs_list = [ "$externs_path/settings_private.js" ] |
| } |
| |
| js_library("security_keys_set_pin_dialog") { |
| deps = [ |
| ":security_keys_browser_proxy", |
| "//third_party/polymer/v1_0/components-chromium/iron-a11y-announcer:iron-a11y-announcer-extracted", |
| "//ui/webui/resources/js:i18n_behavior", |
| ] |
| externs_list = [ "$externs_path/settings_private.js" ] |
| } |
| |
| js_library("security_keys_pin_field") { |
| deps = [ "//ui/webui/resources/js:i18n_behavior" ] |
| } |
| |
| js_library("security_keys_credential_management_dialog") { |
| deps = [ |
| ":security_keys_browser_proxy", |
| ":security_keys_pin_field", |
| "//ui/webui/resources/js:i18n_behavior", |
| "//ui/webui/resources/js:web_ui_listener_behavior", |
| ] |
| } |
| |
| js_library("security_keys_reset_dialog") { |
| deps = [ |
| ":security_keys_browser_proxy", |
| "//ui/webui/resources/js:i18n_behavior", |
| ] |
| externs_list = [ "$externs_path/settings_private.js" ] |
| } |
| |
| js_library("security_keys_bio_enroll_dialog") { |
| deps = [ |
| ":security_keys_browser_proxy", |
| ":security_keys_pin_field", |
| "//third_party/polymer/v1_0/components-chromium/iron-a11y-announcer:iron-a11y-announcer-extracted", |
| "//ui/webui/resources/cr_elements/cr_fingerprint:cr_fingerprint_progress_arc", |
| "//ui/webui/resources/js:i18n_behavior", |
| ] |
| externs_list = [ "$externs_path/settings_private.js" ] |
| } |
| |
| js_library("security_page") { |
| deps = [ |
| ":privacy_page_browser_proxy", |
| "..:metrics_browser_proxy", |
| "..:route", |
| "..:router", |
| "../people_page:sync_browser_proxy", |
| "../prefs:prefs_behavior", |
| "//ui/webui/resources/js:assert", |
| "//ui/webui/resources/js:load_time_data", |
| "//ui/webui/resources/js:web_ui_listener_behavior", |
| "//ui/webui/resources/js/cr/ui:focus_without_ink", |
| ] |
| } |
| |
| # TODO(crbug.com/1026426): Fix and enable. |
| js_type_check("closure_compile_module") { |
| is_polymer3 = true |
| deps = [ |
| #":passwords_leak_detection_toggle.m", |
| ":personalization_options.m", |
| ":privacy_page.m", |
| ":privacy_page_browser_proxy.m", |
| ":security_keys_bio_enroll_dialog.m", |
| ":security_keys_browser_proxy.m", |
| ":security_keys_credential_management_dialog.m", |
| ":security_keys_pin_field.m", |
| ":security_keys_reset_dialog.m", |
| ":security_keys_set_pin_dialog.m", |
| ":security_keys_subpage.m", |
| |
| #":security_page.m", |
| ] |
| } |
| |
| js_library("passwords_leak_detection_toggle.m") { |
| sources = [ "$root_gen_dir/chrome/browser/resources/settings/privacy_page/passwords_leak_detection_toggle.m.js" ] |
| deps = [ |
| # TODO: Fill those in. |
| ] |
| extra_deps = [ ":passwords_leak_detection_toggle_module" ] |
| } |
| |
| 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.m", |
| "..: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.m") { |
| sources = [ "$root_gen_dir/chrome/browser/resources/settings/privacy_page/privacy_page.m.js" ] |
| deps = [ |
| ":privacy_page_browser_proxy.m", |
| "..:hats_browser_proxy.m", |
| "..:i18n_setup.m", |
| "..:metrics_browser_proxy.m", |
| "..:page_visibility.m", |
| "..:route.m", |
| "..:router.m", |
| "../controls:settings_toggle_button.m", |
| "../people_page:sync_browser_proxy.m", |
| "../prefs:prefs_behavior.m", |
| "../site_settings:constants.m", |
| "../site_settings:site_data_details_subpage.m", |
| "../site_settings:site_settings_prefs_browser_proxy.m", |
| "//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", |
| ] |
| extra_deps = [ ":privacy_page_module" ] |
| } |
| |
| 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.m") { |
| sources = [ "$root_gen_dir/chrome/browser/resources/settings/privacy_page/security_keys_bio_enroll_dialog.m.js" ] |
| deps = [ |
| ":security_keys_browser_proxy.m", |
| ":security_keys_pin_field.m", |
| "//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", |
| ] |
| extra_deps = [ ":security_keys_bio_enroll_dialog_module" ] |
| } |
| |
| js_library("security_keys_browser_proxy.m") { |
| sources = [ "$root_gen_dir/chrome/browser/resources/settings/privacy_page/security_keys_browser_proxy.m.js" ] |
| deps = [ "//ui/webui/resources/js:cr.m" ] |
| extra_deps = [ ":modulize" ] |
| } |
| |
| js_library("security_keys_credential_management_dialog.m") { |
| sources = [ "$root_gen_dir/chrome/browser/resources/settings/privacy_page/security_keys_credential_management_dialog.m.js" ] |
| deps = [ |
| ":security_keys_browser_proxy.m", |
| ":security_keys_pin_field.m", |
| "//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", |
| ] |
| extra_deps = [ ":security_keys_credential_management_dialog_module" ] |
| } |
| |
| js_library("security_keys_pin_field.m") { |
| sources = [ "$root_gen_dir/chrome/browser/resources/settings/privacy_page/security_keys_pin_field.m.js" ] |
| 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", |
| ] |
| extra_deps = [ ":security_keys_pin_field_module" ] |
| } |
| |
| js_library("security_keys_reset_dialog.m") { |
| sources = [ "$root_gen_dir/chrome/browser/resources/settings/privacy_page/security_keys_reset_dialog.m.js" ] |
| deps = [ |
| ":security_keys_browser_proxy.m", |
| "//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled", |
| "//ui/webui/resources/js:i18n_behavior.m", |
| ] |
| extra_deps = [ ":security_keys_reset_dialog_module" ] |
| } |
| |
| js_library("security_keys_set_pin_dialog.m") { |
| sources = [ "$root_gen_dir/chrome/browser/resources/settings/privacy_page/security_keys_set_pin_dialog.m.js" ] |
| deps = [ |
| ":security_keys_browser_proxy.m", |
| "//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", |
| ] |
| extra_deps = [ ":security_keys_set_pin_dialog_module" ] |
| } |
| |
| js_library("security_keys_subpage.m") { |
| sources = [ "$root_gen_dir/chrome/browser/resources/settings/privacy_page/security_keys_subpage.m.js" ] |
| deps = [ |
| "..:i18n_setup.m", |
| "//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled", |
| "//ui/webui/resources/js:assert.m", |
| ] |
| extra_deps = [ ":security_keys_subpage_module" ] |
| } |
| |
| js_library("security_page.m") { |
| sources = [ "$root_gen_dir/chrome/browser/resources/settings/privacy_page/security_page.m.js" ] |
| deps = [ |
| # TODO: Fill those in. |
| ] |
| extra_deps = [ ":security_page_module" ] |
| } |
| |
| group("polymer3_elements") { |
| public_deps = [ |
| ":modulize", |
| ":passwords_leak_detection_toggle_module", |
| ":personalization_options_module", |
| ":privacy_page_module", |
| ":security_keys_bio_enroll_dialog_module", |
| ":security_keys_credential_management_dialog_module", |
| ":security_keys_pin_field_module", |
| ":security_keys_reset_dialog_module", |
| ":security_keys_set_pin_dialog_module", |
| ":security_keys_subpage_module", |
| ":security_page_module", |
| ] |
| } |
| |
| polymer_modulizer("passwords_leak_detection_toggle") { |
| js_file = "passwords_leak_detection_toggle.js" |
| html_file = "passwords_leak_detection_toggle.html" |
| html_type = "dom-module" |
| } |
| |
| polymer_modulizer("personalization_options") { |
| js_file = "personalization_options.js" |
| html_file = "personalization_options.html" |
| html_type = "dom-module" |
| namespace_rewrites = settings_namespace_rewrites |
| 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", |
| ] |
| } |
| |
| polymer_modulizer("privacy_page") { |
| js_file = "privacy_page.js" |
| html_file = "privacy_page.html" |
| html_type = "dom-module" |
| ignore_imports = [ |
| "chrome/browser/resources/settings/privacy_page/do_not_track_toggle.html", |
| "chrome/browser/resources/settings/privacy_page/secure_dns.html", |
| "chrome/browser/resources/settings/privacy_page/security_page.html", |
| "chrome/browser/resources/settings/privacy_page/passwords_leak_detection_toggle.html", |
| ] |
| namespace_rewrites = settings_namespace_rewrites |
| auto_imports = settings_auto_imports + [ |
| "ui/webui/resources/html/assert.html|assert", |
| "chrome/browser/resources/settings/route.html|routes", |
| "chrome/browser/resources/settings/metrics_browser_proxy.html|PrivacyElementInteractions,MetricsBrowserProxyImpl", |
| "chrome/browser/resources/settings/privacy_page/privacy_page_browser_proxy.html|PrivacyPageBrowserProxy,PrivacyPageBrowserProxyImpl", |
| "chrome/browser/resources/settings/site_settings/site_settings_prefs_browser_proxy.html|SiteSettingsPrefsBrowserProxyImpl", |
| "chrome/browser/resources/settings/site_settings/constants.html|ContentSettingsTypes,ChooserType", |
| "chrome/browser/resources/settings/people_page/sync_browser_proxy.html|SyncBrowserProxyImpl,SyncStatus", |
| "chrome/browser/resources/settings/hats_browser_proxy.html|HatsBrowserProxyImpl", |
| "chrome/browser/resources/settings/page_visibility.html|PrivacyPageVisibility", |
| "chrome/browser/resources/settings/router.html|RouteObserverBehavior,Router", |
| ] |
| } |
| |
| polymer_modulizer("security_keys_bio_enroll_dialog") { |
| js_file = "security_keys_bio_enroll_dialog.js" |
| html_file = "security_keys_bio_enroll_dialog.html" |
| html_type = "dom-module" |
| namespace_rewrites = settings_namespace_rewrites |
| auto_imports = settings_auto_imports + [ |
| "chrome/browser/resources/settings/privacy_page/security_keys_browser_proxy.html|SecurityKeysBioEnrollProxy,SecurityKeysBioEnrollProxyImpl,Ctap2Status,SampleStatus,Enrollment,EnrollmentResponse,SampleResponse,", |
| "ui/webui/resources/html/assert.html|assert,assertNotReached", |
| "ui/webui/resources/html/polymer.html|afterNextRender,html,Polymer", |
| ] |
| } |
| |
| polymer_modulizer("security_keys_credential_management_dialog") { |
| js_file = "security_keys_credential_management_dialog.js" |
| html_file = "security_keys_credential_management_dialog.html" |
| html_type = "dom-module" |
| namespace_rewrites = settings_namespace_rewrites |
| auto_imports = settings_auto_imports + [ |
| "chrome/browser/resources/settings/privacy_page/security_keys_browser_proxy.html|SecurityKeysCredentialBrowserProxy,SecurityKeysCredentialBrowserProxyImpl,Credential", |
| "ui/webui/resources/html/assert.html|assert,assertNotReached", |
| ] |
| } |
| |
| polymer_modulizer("security_keys_pin_field") { |
| js_file = "security_keys_pin_field.js" |
| html_file = "security_keys_pin_field.html" |
| html_type = "dom-module" |
| namespace_rewrites = settings_namespace_rewrites |
| auto_imports = |
| settings_auto_imports + |
| [ "ui/webui/resources/html/polymer.html|afterNextRender,html,Polymer" ] |
| } |
| |
| polymer_modulizer("security_keys_reset_dialog") { |
| js_file = "security_keys_reset_dialog.js" |
| html_file = "security_keys_reset_dialog.html" |
| html_type = "dom-module" |
| namespace_rewrites = settings_namespace_rewrites |
| auto_imports = settings_auto_imports + [ "chrome/browser/resources/settings/privacy_page/security_keys_browser_proxy.html|SecurityKeysResetBrowserProxy,SecurityKeysResetBrowserProxyImpl" ] |
| } |
| |
| polymer_modulizer("security_keys_set_pin_dialog") { |
| js_file = "security_keys_set_pin_dialog.js" |
| html_file = "security_keys_set_pin_dialog.html" |
| html_type = "dom-module" |
| namespace_rewrites = settings_namespace_rewrites |
| auto_imports = settings_auto_imports + [ |
| "chrome/browser/resources/settings/privacy_page/security_keys_browser_proxy.html|SecurityKeysPINBrowserProxy,SecurityKeysPINBrowserProxyImpl", |
| "ui/webui/resources/html/polymer.html|afterNextRender,html,Polymer", |
| ] |
| } |
| |
| polymer_modulizer("security_keys_subpage") { |
| js_file = "security_keys_subpage.js" |
| html_file = "security_keys_subpage.html" |
| html_type = "dom-module" |
| namespace_rewrites = settings_namespace_rewrites |
| auto_imports = |
| settings_auto_imports + [ "ui/webui/resources/html/assert.html|assert" ] |
| } |
| |
| polymer_modulizer("security_page") { |
| js_file = "security_page.js" |
| html_file = "security_page.html" |
| html_type = "dom-module" |
| } |
| |
| js_modulizer("modulize") { |
| input_files = [ |
| "privacy_page_browser_proxy.js", |
| "security_keys_browser_proxy.js", |
| ] |
| |
| namespace_rewrites = settings_namespace_rewrites |
| } |