chromium/ash/webui/sample_system_web_app_ui/resources/untrusted/BUILD.gn

# Copyright 2021 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//build/config/chromeos/ui_mode.gni")
import("//ui/webui/resources/tools/build_webui.gni")

assert(is_chromeos_ash, "Sample System Web App is ash-chrome only")
assert(!is_official_build,
       "Sample System Web App is only built for unofficial builds")

build_webui("build") {
  grd_prefix = "ash_sample_system_web_app_untrusted"

  static_files = [ "untrusted.html" ]

  non_web_component_files = [
    "untrusted.ts",
    "untrusted_page_interface.ts",
  ]

  mojo_files_deps = [ "../../mojom:mojo_bindings_ts__generator" ]

  mojo_files = [
    "$root_gen_dir/ash/webui/sample_system_web_app_ui/mojom/sample_system_web_app_shared_ui.mojom-webui.ts",
    "$root_gen_dir/ash/webui/sample_system_web_app_ui/mojom/sample_system_web_app_untrusted_ui.mojom-webui.ts",
  ]

  ts_composite = true
  ts_deps = [ "//ui/webui/resources/mojo:build_ts" ]

  webui_context_type = "untrusted"
  grit_output_dir = "$root_gen_dir/ash/webui"
}