chromium/ash/webui/scanning/resources/BUILD.gn

# Copyright 2020 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)

build_webui("build") {
  static_files = [
    "index.html",
    "scanning_app_icon_128.png",
    "scanning_app_icon_16.png",
    "scanning_app_icon_192.png",
    "scanning_app_icon_256.png",
    "scanning_app_icon_32.png",
    "scanning_app_icon_48.png",
    "scanning_app_icon_64.png",
    "svg/illo_loading_scanner.svg",
    "svg/illo_no_scanner.svg",
    "svg/illo_ready_to_scan.svg",
    "svg/remove_page.svg",
    "svg/rescan_page.svg",
  ]

  css_files = [
    "scanning_fonts.css",
    "scanning_shared.css",
  ]

  web_component_files = [
    "action_toolbar.ts",
    "color_mode_select.ts",
    "file_type_select.ts",
    "loading_page.ts",
    "multi_page_checkbox.ts",
    "multi_page_scan.ts",
    "page_size_select.ts",
    "resolution_select.ts",
    "scan_done_section.ts",
    "scanner_select.ts",
    "scanning_app.ts",
    "scan_preview.ts",
    "scan_settings_section.ts",
    "scan_to_select.ts",
    "source_select.ts",
  ]

  non_web_component_files = [
    "mojo_interface_provider.ts",
    "scanning_app_types.ts",
    "scanning_app_util.ts",
    "scanning_browser_proxy.ts",
    "select_mixin.ts",
  ]

  mojo_files = [
    "$root_gen_dir/ash/webui/common/mojom/accessibility_features.mojom-webui.ts",
    "$root_gen_dir/ash/webui/scanning/mojom/scanning.mojom-webui.ts",
  ]

  mojo_files_deps = [
    "//ash/webui/common/mojom:mojom_ts__generator",
    "//ash/webui/scanning/mojom:mojom_ts__generator",
  ]

  ts_composite = true

  ts_definitions = [ "//tools/typescript/definitions/chrome_send.d.ts" ]

  ts_deps = [
    "//ash/webui/common/resources:build_ts",
    "//ash/webui/common/resources/cr_elements:build_ts",
    "//third_party/polymer/v3_0:library",
    "//ui/webui/resources/cr_components/color_change_listener:build_ts",
    "//ui/webui/resources/js:build_ts",
    "//ui/webui/resources/mojo:build_ts",
  ]

  webui_context_type = "trusted"
  grd_prefix = "ash_scanning_app"
  grit_output_dir = "$root_gen_dir/ash/webui"
}