blob: 81334f34aaa458b7e10c51a65c596972d8f85921 [file] [log] [blame]
# 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("//tools/grit/preprocess_if_expr.gni")
import("//tools/typescript/webui_ts_library.gni")
import("//ui/webui/resources/tools/generate_grd.gni")
assert(is_chromeos, "Files Internals is ChromeOS only")
static_library("files_internals") {
sources = [
"files_internals_page_handler.cc",
"files_internals_page_handler.h",
"files_internals_ui.cc",
"files_internals_ui.h",
"files_internals_ui_delegate.h",
"url_constants.cc",
"url_constants.h",
]
deps = [
"//ash/webui/common:chrome_os_webui_config",
"//ash/webui/files_internals/mojom",
"//ash/webui/resources:files_internals_resources",
"//content/public/browser",
"//ui/webui",
]
}
grd_prefix = "ash_files_internals"
mojo_grdp = "$target_gen_dir/files_internals_mojo_resources.grdp"
preprocess_if_expr("copy_mojo_ts") {
visibility = [ ":build_ts" ]
in_folder = root_gen_dir
in_files =
[ "ash/webui/files_internals/mojom/files_internals.mojom-webui.ts" ]
deps = [ "//ash/webui/files_internals/mojom:mojom_ts__generator" ]
out_folder = "$target_gen_dir/preprocessed"
}
webui_ts_library("build_ts") {
root_dir = "$target_gen_dir/preprocessed"
out_dir = "$target_gen_dir/tsc"
composite = true
in_files =
[ "ash/webui/files_internals/mojom/files_internals.mojom-webui.ts" ]
deps = [ "//ui/webui/resources/mojo:build_ts" ]
extra_deps = [ ":copy_mojo_ts" ]
}
generate_grd("build_mojo_grdp") {
grd_prefix = grd_prefix
out_grd = mojo_grdp
deps = [ ":build_ts" ]
# Flatten out the dependency tree of your mojom and add generated bindings
# file here.
input_files =
[ "ash/webui/files_internals/mojom/files_internals.mojom-webui.js" ]
input_files_base_dir = rebase_path("$target_gen_dir/tsc", root_build_dir)
}
generate_grd("build_grd") {
input_files_base_dir = rebase_path("resources", "//")
input_files = [
"index.html",
"index.js",
]
grd_prefix = grd_prefix
out_grd = "$target_gen_dir/${grd_prefix}_resources.grd"
deps = [ ":build_mojo_grdp" ]
grdp_files = [ mojo_grdp ]
}