| # 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") |
| |
| group("closure_compile") { |
| deps = [ |
| ":cr_elements_resources", |
| "cr_action_menu:closure_compile", |
| "cr_button:closure_compile", |
| "cr_checkbox:closure_compile", |
| "cr_dialog:closure_compile", |
| "cr_drawer:closure_compile", |
| "cr_expand_button:closure_compile", |
| "cr_fingerprint:closure_compile", |
| "cr_icon_button:closure_compile", |
| "cr_input:closure_compile", |
| "cr_link_row:closure_compile", |
| "cr_profile_avatar_selector:closure_compile", |
| "cr_radio_button:closure_compile", |
| "cr_radio_group:closure_compile", |
| "cr_search_field:closure_compile", |
| "cr_slider:closure_compile", |
| "cr_tabs:closure_compile", |
| "cr_toast:closure_compile", |
| "cr_toggle:closure_compile", |
| "cr_view_manager:closure_compile", |
| "policy:closure_compile", |
| |
| # Targets for auto-generated Polymer 3 JS Modules |
| ":cr_elements_module_resources", |
| "cr_action_menu:closure_compile_module", |
| "cr_button:closure_compile_module", |
| "cr_checkbox:closure_compile_module", |
| "cr_dialog:closure_compile_module", |
| "cr_drawer:closure_compile_module", |
| "cr_expand_button:closure_compile_module", |
| "cr_icon_button:closure_compile_module", |
| "cr_input:closure_compile_module", |
| "cr_lazy_render:closure_compile_module", |
| "cr_link_row:closure_compile_module", |
| "cr_radio_button:closure_compile_module", |
| "cr_radio_group:closure_compile_module", |
| "cr_search_field:closure_compile_module", |
| "cr_tabs:closure_compile_module", |
| "cr_toast:closure_compile_module", |
| "cr_toggle:closure_compile_module", |
| "cr_toolbar:closure_compile_module", |
| "cr_view_manager:closure_compile_module", |
| "policy:closure_compile_module", |
| ] |
| |
| if (is_chromeos) { |
| deps += [ |
| "chromeos:closure_compile", |
| |
| # cr-searchable-drop-down is only used in smb and cups dialogs, both of |
| # which are chromeos only. |
| "cr_searchable_drop_down:closure_compile", |
| ] |
| } |
| } |
| |
| js_type_check("cr_elements_resources") { |
| deps = [ |
| ":cr_container_shadow_behavior", |
| ":cr_scrollable_behavior", |
| ] |
| } |
| |
| js_library("cr_scrollable_behavior") { |
| deps = [ |
| "//third_party/polymer/v1_0/components-chromium/iron-list:iron-list-extracted", |
| ] |
| } |
| |
| js_library("cr_container_shadow_behavior") { |
| deps = [ |
| "//ui/webui/resources/js:assert", |
| ] |
| } |
| |
| # Targets for auto-generating Polymer 3 JS Modules. |
| |
| polymer_modulizer("action_link_css") { |
| js_file = "action_link_css.m.js" |
| html_file = "action_link_css.html" |
| html_type = "style-module" |
| } |
| |
| polymer_modulizer("shared_vars_css") { |
| js_file = "shared_vars_css.m.js" |
| html_file = "shared_vars_css.html" |
| html_type = "custom-style" |
| } |
| |
| polymer_modulizer("shared_style_css") { |
| js_file = "shared_style_css.m.js" |
| html_file = "shared_style_css.html" |
| html_type = "style-module" |
| } |
| |
| polymer_modulizer("hidden_style_css") { |
| js_file = "hidden_style_css.m.js" |
| html_file = "hidden_style_css.html" |
| html_type = "style-module" |
| } |
| |
| polymer_modulizer("md_select_css") { |
| js_file = "md_select_css.m.js" |
| html_file = "md_select_css.html" |
| html_type = "style-module" |
| } |
| |
| polymer_modulizer("cr_icons_css") { |
| js_file = "cr_icons_css.m.js" |
| html_file = "cr_icons_css.html" |
| html_type = "style-module" |
| } |
| |
| polymer_modulizer("icons") { |
| js_file = "icons.m.js" |
| html_file = "icons.html" |
| html_type = "iron-iconset" |
| } |
| |
| js_modulizer("modulize") { |
| input_files = [ "cr_container_shadow_behavior.js" ] |
| deps = [] |
| } |
| |
| group("polymer3_elements") { |
| deps = [ |
| ":action_link_css_module", |
| ":cr_icons_css_module", |
| ":hidden_style_css_module", |
| ":icons_module", |
| ":md_select_css_module", |
| ":modulize", |
| ":shared_style_css_module", |
| ":shared_vars_css_module", |
| "cr_action_menu:cr_action_menu_module", |
| "cr_button:cr_button_module", |
| "cr_checkbox:cr_checkbox_module", |
| "cr_dialog:cr_dialog_module", |
| "cr_drawer:cr_drawer_module", |
| "cr_expand_button:cr_expand_button_module", |
| "cr_icon_button:cr_icon_button_module", |
| "cr_input:cr_input_module", |
| "cr_input:cr_input_style_css_module", |
| "cr_lazy_render:cr_lazy_render_module", |
| "cr_link_row:cr_link_row_module", |
| "cr_radio_button:cr_radio_button_module", |
| "cr_radio_button:cr_radio_button_style_css_module", |
| "cr_radio_button:modulize", |
| "cr_radio_group:cr_radio_group_module", |
| "cr_search_field:cr_search_field_module", |
| "cr_search_field:modulize", |
| "cr_tabs:cr_tabs_module", |
| "cr_toast:cr_toast_manager_module", |
| "cr_toast:cr_toast_module", |
| "cr_toggle:cr_toggle_module", |
| "cr_toolbar:cr_toolbar_module", |
| "cr_toolbar:cr_toolbar_search_field_module", |
| "cr_toolbar:cr_toolbar_selection_overlay_module", |
| "cr_view_manager:cr_view_manager_module", |
| "policy:cr_tooltip_icon_module", |
| ] |
| } |
| |
| js_type_check("cr_elements_module_resources") { |
| deps = [ |
| ":cr_container_shadow_behavior.m", |
| ] |
| } |
| |
| js_library("cr_container_shadow_behavior.m") { |
| sources = [ |
| "$root_gen_dir/ui/webui/resources/cr_elements/cr_container_shadow_behavior.m.js", |
| ] |
| deps = [ |
| "//ui/webui/resources/js:assert.m", |
| ] |
| extra_deps = [ ":modulize" ] |
| } |