1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
|
# Copyright 2022 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("//ui/webui/resources/include_polymer.gni")
# TS files holding a non-Polymer element definition and have an equivalent .html
# file.
web_component_files_native_ts = [
"cr_tab_box/cr_tab_box.ts",
"cr_tree/cr_tree.ts",
"cr_tree/cr_tree_item.ts",
]
# Files that are passed as input to html_to_wrapper().
native_html_files = []
foreach(f, web_component_files_native_ts) {
native_html_files += [ string_replace(f, ".ts", ".html") ]
}
# Files that are generated by html_to_wrapper().
native_html_wrapper_files = []
foreach(f, native_html_files) {
native_html_wrapper_files += [ f + ".ts" ]
}
if (include_polymer) {
# TS files holding a Polymer element definition and have an equivalent .html
# file.
web_component_files_polymer_ts = [
"cr_a11y_announcer/cr_a11y_announcer.ts",
"cr_action_menu/cr_action_menu.ts",
"cr_checkbox/cr_checkbox.ts",
"cr_drawer/cr_drawer.ts",
"cr_expand_button/cr_expand_button.ts",
"cr_fingerprint/cr_fingerprint_progress_arc.ts",
"cr_grid/cr_grid.ts",
"cr_link_row/cr_link_row.ts",
"cr_profile_avatar_selector/cr_profile_avatar_selector_grid.ts",
"cr_profile_avatar_selector/cr_profile_avatar_selector.ts",
"cr_radio_group/cr_radio_group.ts",
"cr_search_field/cr_search_field.ts",
"cr_slider/cr_slider.ts",
"cr_tabs/cr_tabs.ts",
"cr_toast/cr_toast_manager.ts",
"cr_toast/cr_toast.ts",
"cr_toolbar/cr_toolbar.ts",
"cr_toolbar/cr_toolbar_search_field.ts",
"cr_toolbar/cr_toolbar_selection_overlay.ts",
"cr_view_manager/cr_view_manager.ts",
]
if (is_chromeos) {
web_component_files_polymer_ts +=
[ "cr_searchable_drop_down/cr_searchable_drop_down.ts" ]
}
icons_html_files = [
"mwb_shared_icons.html",
"cr_fingerprint/cr_fingerprint_icon.html",
]
# Polymer HTML files that are passed as input to html_to_wrapper().
polymer_html_files = []
foreach(f, web_component_files_polymer_ts) {
polymer_html_files += [ string_replace(f, ".ts", ".html") ]
}
# Files that are generated by html_to_wrapper().
polymer_html_wrapper_files = []
foreach(f, polymer_html_files + icons_html_files) {
polymer_html_wrapper_files += [ f + ".ts" ]
}
}
# Files that either dont hold a custom element definition or the custom element
# does not have an equivalent .html file.
non_web_component_files_ts = [
"cr_lazy_render/cr_lazy_render.ts",
"cr_splitter/cr_splitter.ts",
"cr_tree/cr_tree_base.ts",
]
if (include_polymer) {
non_web_component_files_ts += [
"cr_auto_img/cr_auto_img.ts",
"cr_container_shadow_mixin.ts",
"cr_menu_selector/cr_menu_selector.ts",
"cr_search_field/cr_search_field_mixin.ts",
"find_shortcut_mixin.ts",
"mouse_hoverable_mixin.ts",
]
# Files that are passed as input to css_to_wrapper().
css_files = [
"cr_nav_menu_item_style.css",
"cr_page_host_style.css",
"cr_radio_button/cr_radio_button_style.css",
"mwb_element_shared_style.css",
"mwb_shared_style.css",
"mwb_shared_vars.css",
"search_highlight_style.css",
"cr_input/cr_input_style.css",
]
# Files that are generated by css_to_wrapper().
css_wrapper_files = []
foreach(f, css_files) {
css_wrapper_files += [ f + ".ts" ]
}
}
# List of all files above with the "cr_elements/" prefix to be used in a parent
# BUILD.gn file.
cr_elements_files = []
foreach(f,
web_component_files_native_ts + native_html_wrapper_files +
non_web_component_files_ts) {
cr_elements_files += [ "cr_elements/" + f ]
}
if (include_polymer) {
foreach(f,
web_component_files_polymer_ts + polymer_html_wrapper_files +
css_wrapper_files) {
cr_elements_files += [ "cr_elements/" + f ]
}
}
|