chromium/chrome/browser/resources/omnibox_popup/BUILD.gn

# Copyright 2022 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(!is_android && !is_ios)

build_webui("build") {
  grd_prefix = "omnibox_popup"
  static_files = [ "omnibox_popup.html" ]
  web_component_files = [ "app.ts" ]
  non_web_component_files = [ "omnibox_popup.ts" ]
  ts_composite = true
  ts_deps = [
    "//third_party/polymer/v3_0:library",
    "//ui/webui/resources/cr_components/color_change_listener:build_ts",
    "//ui/webui/resources/cr_components/searchbox:build_ts",
    "//ui/webui/resources/js:build_ts",
  ]
  webui_context_type = "trusted"
  optimize = optimize_webui
  if (optimize) {
    optimize_webui_host = "omnibox-popup.top-chrome"
    optimize_webui_in_files = [ "omnibox_popup.js" ]
    optimize_webui_excludes = [
      "chrome://resources/cr_components/color_change_listener/color_change_listener.mojom-webui.js",
      "chrome://resources/cr_components/searchbox/searchbox.mojom-webui.js",
      "chrome://resources/js/metrics_reporter/metrics_reporter.mojom-webui.js",
      "chrome://resources/mojo/mojo/public/mojom/base/string16.mojom-webui.js",
      "chrome://resources/mojo/mojo/public/mojom/base/time.mojom-webui.js",
      "chrome://resources/mojo/url/mojom/url.mojom-webui.js",
    ]
  }
  webui_context_type = "trusted"
}