chromium/content/browser/resources/webxr_internals/BUILD.gn

# Copyright 2023 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//ui/webui/resources/tools/build_webui.gni")

assert(enable_vr)

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

  static_files = [
    "webxr_internals.html",
    "webxr_internals.css",
  ]

  web_component_files = [
    "active_runtime_info_table.ts",
    "device_info_table.ts",
    "runtime_changelog_table.ts",
    "session_info_table.ts",
    "session_statistics_table.ts",
  ]

  non_web_component_files = [
    "browser_proxy.ts",
    "time_util.ts",
    "webxr_internals.ts",
    "xr_runtime_util.ts",
    "xr_session_util.ts",
  ]

  mojo_files = [
    "$root_gen_dir/content/browser/xr/webxr_internals/mojom/webxr_internals.mojom-webui.ts",
    "$root_gen_dir/device/vr/public/mojom/xr_device.mojom-webui.ts",
    "$root_gen_dir/device/vr/public/mojom/xr_session.mojom-webui.ts",
  ]

  mojo_files_deps = [
    "//content/browser/xr/webxr_internals/mojom:mojo_bindings_ts__generator",
    "//device/vr/public/mojom:xr_common_ts__generator",
  ]

  html_to_wrapper_template = "native"

  ts_deps = [
    "//ui/webui/resources/js:build_ts",
    "//ui/webui/resources/mojo:build_ts",
  ]

  webui_context_type = "trusted"
  grit_output_dir = "$root_gen_dir/content"
}