910e62b5创建于 1月15日历史提交
# Copyright 2024 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//mojo/public/tools/bindings/mojom.gni")
import("//ui/webui/resources/tools/build_webui.gni")

assert(is_chromeos)

static_library("growth_internals") {
  sources = [
    "constants.h",
    "growth_internals_page_handler.cc",
    "growth_internals_page_handler.h",
    "growth_internals_ui.cc",
    "growth_internals_ui.h",
  ]

  public_deps = [
    "//content/public/browser",
    "//content/public/common",
    "//ui/webui",
  ]

  deps = [
    ":mojom",
    ":resources",
    ":resources_grit",
    "//ash/constants",
    "//ash/webui/common:chrome_os_webui_config",
    "//base",
    "//chromeos/ash/components/growth",
    "//chromeos/ash/components/growth:utils",
  ]
}

mojom("mojom") {
  sources = [ "growth_internals.mojom" ]

  webui_module_path = "/"
}

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

  static_files = [ "index.html" ]

  web_component_files = [ "app.ts" ]

  ts_files = [ "browser_proxy.ts" ]

  mojo_files_deps = [ ":mojom_ts__generator" ]
  mojo_files = [
    "$root_gen_dir/ash/webui/growth_internals/growth_internals.mojom-webui.ts",
  ]

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

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