chromium/ui/webui/resources/cr_components/color_change_listener/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("//mojo/public/tools/bindings/mojom.gni")
import("//ui/webui/resources/tools/build_webui.gni")

assert(!is_android && !is_ios)

mojom("mojom") {
  sources = [ "color_change_listener.mojom" ]
  public_deps = [ "//mojo/public/mojom/base" ]
  webui_module_path = "chrome://resources/cr_components/color_change_listener/"
}

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

  non_web_component_files = [
    "browser_proxy.ts",
    "colors_css_updater.ts",
  ]

  mojo_files_deps = [ ":mojom_ts__generator" ]
  mojo_files = [ "$target_gen_dir/color_change_listener.mojom-webui.ts" ]

  ts_out_dir =
      "$root_gen_dir/ui/webui/resources/tsc/cr_components/color_change_listener"
  ts_composite = true
  ts_deps = [
    "//ui/webui/resources/js:build_ts",
    "//ui/webui/resources/mojo:build_ts",
  ]
  webui_context_type = "relative"
  generate_grdp = true
  grd_resource_path_prefix = rebase_path(".", "//ui/webui/resources")
}