blob: 3aced57db9589afa9d27ba7bff9eeda3b102544d [file] [log] [blame]
# Copyright 2020 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("./nearby_shared.gni")
js_type_check("closure_compile") {
deps = [
":nearby_contact_visibility",
":nearby_onboarding_page",
":nearby_page_template",
":nearby_share_settings",
":nearby_share_settings_behavior",
":nearby_visibility_page",
]
closure_flags =
default_closure_args + [
"js_module_root=../../chrome/browser/resources/nearby_share/shared/",
"js_module_root=./gen/chrome/browser/resources/nearby_share/shared/",
]
}
js_library("nearby_contact_visibility") {
deps = [
":nearby_share_settings_behavior",
"//third_party/polymer/v1_0/components-chromium/iron-icon:iron-icon-extracted",
"//third_party/polymer/v1_0/components-chromium/iron-list:iron-list-extracted",
"//ui/webui/resources/cr_elements/cr_radio_button:cr_card_radio_button",
"//ui/webui/resources/cr_elements/cr_radio_group:cr_radio_group",
"//ui/webui/resources/js:i18n_behavior",
]
}
js_library("nearby_page_template") {
}
js_library("nearby_onboarding_page") {
deps = [
":nearby_share_settings_behavior",
"//third_party/polymer/v1_0/components-chromium/iron-icon:iron-icon-extracted",
"//ui/webui/resources/cr_elements/cr_input:cr_input",
"//ui/webui/resources/js:i18n_behavior",
]
}
js_library("nearby_share_settings") {
deps = [
"//chrome/browser/ui/webui/nearby_share/public/mojom:mojom_js_library_for_compile",
"//ui/webui/resources/js:cr",
]
}
js_library("nearby_share_settings_behavior") {
deps = [
":nearby_share_settings",
"//ui/webui/resources/js:cr",
]
}
js_library("nearby_visibility_page") {
deps = [
":nearby_contact_visibility",
":nearby_share_settings_behavior",
"//ui/webui/resources/js:i18n_behavior",
]
}
js_type_check("closure_compile_module") {
is_polymer3 = true
closure_flags =
default_closure_args + [
"js_module_root=../../chrome/browser/resources/nearby_share/shared/",
"js_module_root=./gen/chrome/browser/resources/nearby_share/shared/",
]
deps = [
":nearby_contact_visibility.m",
":nearby_onboarding_page.m",
":nearby_page_template.m",
":nearby_share_settings.m",
":nearby_share_settings_behavior.m",
":nearby_visibility_page.m",
]
}
group("polymer3_elements") {
public_deps = [
":modulize",
":nearby_contact_visibility_module",
":nearby_onboarding_page_module",
":nearby_page_template_module",
":nearby_shared_icons_module",
":nearby_visibility_page_module",
"//chrome/browser/ui/webui/nearby_share/public/mojom:mojom_js",
]
}
js_library("nearby_contact_visibility.m") {
sources = [ "$root_gen_dir/chrome/browser/resources/nearby_share/shared/nearby_contact_visibility.m.js" ]
deps = [
":nearby_share_settings_behavior.m",
"//third_party/polymer/v3_0/components-chromium/iron-list:iron-list",
"//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled",
"//ui/webui/resources/cr_elements/cr_radio_button:cr_card_radio_button.m",
"//ui/webui/resources/cr_elements/cr_radio_group:cr_radio_group.m",
"//ui/webui/resources/js:i18n_behavior.m",
]
extra_deps = [ ":nearby_contact_visibility_module" ]
}
js_library("nearby_onboarding_page.m") {
sources = [ "$root_gen_dir/chrome/browser/resources/nearby_share/shared/nearby_onboarding_page.m.js" ]
deps = [
":nearby_share_settings_behavior.m",
"//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled",
"//ui/webui/resources/cr_elements/cr_link_row:cr_link_row.m",
"//ui/webui/resources/js:i18n_behavior.m",
]
extra_deps = [ ":nearby_onboarding_page_module" ]
}
js_library("nearby_page_template.m") {
sources = [ "$root_gen_dir/chrome/browser/resources/nearby_share/shared/nearby_page_template.m.js" ]
extra_deps = [ ":nearby_page_template_module" ]
}
js_library("nearby_share_settings_behavior.m") {
sources = [ "$root_gen_dir/chrome/browser/resources/nearby_share/shared/nearby_share_settings_behavior.m.js" ]
deps = [
":nearby_share_settings.m",
"//ui/webui/resources/js:cr.m",
]
extra_deps = [ ":modulize" ]
}
js_library("nearby_share_settings.m") {
sources = [ "$root_gen_dir/chrome/browser/resources/nearby_share/shared/nearby_share_settings.m.js" ]
deps = [
"//chrome/browser/ui/webui/nearby_share/public/mojom:mojom_js_library_for_compile",
"//ui/webui/resources/js:cr.m",
]
extra_deps = [ ":modulize" ]
}
js_library("nearby_visibility_page.m") {
sources = [ "$root_gen_dir/chrome/browser/resources/nearby_share/shared/nearby_visibility_page.m.js" ]
deps = [
":nearby_contact_visibility.m",
":nearby_share_settings_behavior.m",
"//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled",
"//ui/webui/resources/js:i18n_behavior.m",
]
extra_deps = [ ":nearby_visibility_page_module" ]
}
polymer_modulizer("nearby_contact_visibility") {
js_file = "nearby_contact_visibility.js"
html_file = "nearby_contact_visibility.html"
html_type = "dom-module"
auto_imports = nearby_shared_auto_imports
namespace_rewrites = nearby_shared_namespace_rewrites
}
polymer_modulizer("nearby_onboarding_page") {
js_file = "nearby_onboarding_page.js"
html_file = "nearby_onboarding_page.html"
html_type = "dom-module"
auto_imports = nearby_shared_auto_imports
namespace_rewrites = nearby_shared_namespace_rewrites
}
polymer_modulizer("nearby_page_template") {
js_file = "nearby_page_template.js"
html_file = "nearby_page_template.html"
html_type = "dom-module"
auto_imports = nearby_shared_auto_imports
namespace_rewrites = nearby_shared_namespace_rewrites
}
polymer_modulizer("nearby_shared_icons") {
js_file = "nearby_shared_icons.m.js"
html_file = "nearby_shared_icons.html"
html_type = "iron-iconset"
}
polymer_modulizer("nearby_visibility_page") {
js_file = "nearby_visibility_page.js"
html_file = "nearby_visibility_page.html"
html_type = "dom-module"
auto_imports = nearby_shared_auto_imports
namespace_rewrites = nearby_shared_namespace_rewrites
}
js_modulizer("modulize") {
input_files = [
"nearby_share_settings.js",
"nearby_share_settings_behavior.js",
]
namespace_rewrites = nearby_shared_namespace_rewrites
}