1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32
   33
   34
   35
   36
   37
   38
   39
   40
   41
   42
   43
   44
   45
   46
   47
   48
   49
   50
   51
   52
   53
   54
   55
   56
   57
   58
   59
   60
   61
   62
   63
   64
   65
   66
   67

ash / webui / growth_internals / BUILD.gn [blame]

# 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("//build/config/chromeos/ui_mode.gni")
import("//mojo/public/tools/bindings/mojom.gni")
import("//ui/webui/resources/tools/build_webui.gni")

assert(is_chromeos_ash)

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" ]

  non_web_component_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"
}