chromium/ash/webui/projector_app/resources/app/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("//chrome/common/features.gni")
import("//third_party/closure_compiler/compile_js.gni")
import("//ui/webui/resources/tools/generate_grd.gni")

assert(is_chromeos_ash, "Projector is ChromeOS only")

js_library("untrusted_app") {
  sources = [
    "launch.js",
    "untrusted_app_comm_factory.js",
    "untrusted_projector_browser_proxy.js",
  ]
  deps = [
    "//ash/webui/projector_app/mojom:projector_mojo_bindings_webui_js",
    "//ash/webui/projector_app/public/mojom:projector_mojo_bindings_webui_js",
    "//ash/webui/projector_app/resources/common:message_types",
  ]
  extra_deps =
      [ "//ui/webui/resources/cr_components/color_change_listener:build_ts" ]
  externs_list = [
    "../../common/projector_app.externs.js",
    "//ash/webui/web_applications/externs/file_handling.externs.js",
  ]
}

generate_grd("build_untrusted_grd") {
  input_files = [
    "index.html",
    "launch.js",
    "sandboxed_load_time_data.js",
    "untrusted_app_comm_factory.js",
    "untrusted_projector_browser_proxy.js",
    "assets/icon_16.png",
    "assets/icon_32.png",
    "assets/icon_48.png",
    "assets/icon_64.png",
    "assets/icon_96.png",
    "assets/icon_128.png",
    "assets/icon_192.png",
    "assets/icon_256.png",
  ]

  input_files_base_dir = rebase_path(".", "//")
  grd_prefix = "ash_projector_app_untrusted"
  out_grd = "$target_gen_dir/${grd_prefix}_resources.grd"

  deps = [
    "//ash/webui/projector_app/mojom:projector_mojo_bindings_webui_grdp",
    "//ash/webui/projector_app/public/mojom:projector_mojo_bindings_webui_grdp",
  ]
  grdp_files = [
    "$target_gen_dir/../../../mojom/projector_mojo_bindings_webui_resources.grdp",
    "$target_gen_dir/../../../public/mojom/projector_mojo_bindings_webui_resources.grdp",
  ]
}