blob: 14a22c20ce3e12310c16afc7d525da03fed9cbf5 [file] [log] [blame]
# 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("//chrome/common/features.gni")
import("//third_party/closure_compiler/compile_js.gni")
import("//tools/grit/grit_rule.gni")
import("//ui/webui/resources/tools/generate_grd.gni")
js_type_check("closure_compile") {
deps = [ ":apps_page" ]
}
# Using a single js_library() target to work around circular dependencies.
js_library("apps_page") {
sources = [
"app_info.js",
"apps_page.js",
"card_slider.js",
"dot_list.js",
"nav_dot.js",
"new_tab.js",
"page_list_view.js",
"page_switcher.js",
"tile_page.js",
"touch_handler.js",
"trash.js",
]
deps = [
"//ui/webui/resources/js:assert.m",
"//ui/webui/resources/js:cr.m",
"//ui/webui/resources/js:load_time_data.m",
"//ui/webui/resources/js:util.m",
"//ui/webui/resources/js/cr:ui.m",
"//ui/webui/resources/js/cr/ui:context_menu_handler.m",
"//ui/webui/resources/js/cr/ui:drag_wrapper.m",
"//ui/webui/resources/js/cr/ui:menu.m",
"//ui/webui/resources/js/cr/ui:menu_item.m",
]
}
grit("apps_resources") {
defines = chrome_grit_defines
# These arguments are needed since the grd is generated at build time.
enable_input_discovery_for_gn_analyze = false
source = "$target_gen_dir/apps_resources.grd"
deps = [ ":build_apps_grd" ]
outputs = [
"grit/apps_resources.h",
"grit/apps_resources_map.cc",
"grit/apps_resources_map.h",
"apps_resources.pak",
]
output_dir = "$root_gen_dir/chrome"
}
generate_grd("build_apps_grd") {
grd_prefix = "apps"
out_grd = "$target_gen_dir/${grd_prefix}_resources.grd"
input_files = [
"app_info.js",
"apps_page.css",
"apps_page.js",
"card_slider.js",
"dot_list.js",
"images/trash.png",
"nav_dot.css",
"nav_dot.js",
"new_tab.css",
"new_tab.html",
"new_tab.js",
"page_list_view.js",
"page_switcher.js",
"tile_page.css",
"tile_page.js",
"touch_handler.js",
"trash.css",
"trash.js",
]
input_files_base_dir = rebase_path(".", "//")
}