| # Copyright 2022 The Chromium Authors |
| # 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/grit/grit_rule.gni") |
| import("//tools/polymer/html_to_js.gni") |
| import("//ui/webui/resources/tools/generate_grd.gni") |
| |
| resources_grd_file = "$target_gen_dir/resources.grd" |
| generated_grdp_file = "$target_gen_dir/gen_resources.grdp" |
| |
| generate_grd("build_grd") { |
| grd_prefix = "notification_tester" |
| out_grd = resources_grd_file |
| input_files = [ |
| "index.html", |
| "form_constants.js", |
| "types.js", |
| ] |
| input_files_base_dir = rebase_path(".", "//") |
| |
| grdp_files = [ generated_grdp_file ] |
| |
| deps = [ ":build_grdp" ] |
| } |
| |
| generate_grd("build_grdp") { |
| grd_prefix = "notification_tester" |
| out_grd = generated_grdp_file |
| input_files_base_dir = rebase_path(target_gen_dir, root_build_dir) |
| input_files = [ |
| "notification_tester.js", |
| "select_custom.js", |
| ] |
| } |
| |
| grit("resources") { |
| enable_input_discovery_for_gn_analyze = false |
| source = resources_grd_file |
| deps = [ |
| ":build_grd", |
| ":web_components", |
| ] |
| outputs = [ |
| "grit/notification_tester_resources.h", |
| "grit/notification_tester_resources_map.cc", |
| "grit/notification_tester_resources_map.h", |
| "notification_tester_resources.pak", |
| ] |
| output_dir = "$root_gen_dir/chrome" |
| } |
| |
| js_type_check("closure_compile") { |
| is_polymer3 = true |
| deps = [ |
| ":form_constants", |
| ":notification_tester", |
| ":select_custom", |
| ":types", |
| ] |
| } |
| |
| js_library("notification_tester") { |
| deps = [ |
| ":form_constants", |
| ":types", |
| "//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled", |
| ] |
| externs_list = [ "$externs_path/chrome_send.js" ] |
| } |
| |
| js_library("select_custom") { |
| deps = [ |
| "//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled", |
| ] |
| } |
| |
| js_library("types") { |
| } |
| |
| js_library("form_constants") { |
| } |
| |
| html_to_js("web_components") { |
| js_files = [ |
| "notification_tester.js", |
| "select_custom.js", |
| ] |
| } |