chromium/ash/webui/scanning/BUILD.gn

# Copyright 2020 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("//testing/test.gni")

assert(is_chromeos_ash, "Scanning App is ash-chrome only")

static_library("scanning") {
  sources = [
    "scanning_app_delegate.h",
    "scanning_handler.cc",
    "scanning_handler.h",
    "scanning_metrics_handler.cc",
    "scanning_metrics_handler.h",
    "scanning_ui.cc",
    "scanning_ui.h",
    "scanning_uma.cc",
    "scanning_uma.h",
  ]

  public_deps = [ ":url_constants" ]

  deps = [
    "//ash/constants",
    "//ash/webui/common:chrome_os_webui_config",
    "//ash/webui/common:trusted_types_util",
    "//ash/webui/common/backend:backend",
    "//ash/webui/common/mojom",
    "//ash/webui/scanning/mojom",
    "//ash/webui/scanning/resources:resources",
    "//chromeos/strings/",
    "//content/public/browser",
    "//ui/base",
    "//ui/gfx",
    "//ui/resources",
    "//ui/shell_dialogs",
    "//ui/webui",
  ]
}

# Url constants pulled out to enable depending on production url constants in
# browser tests.
source_set("url_constants") {
  sources = [
    "url_constants.cc",
    "url_constants.h",
  ]
}

source_set("unit_tests") {
  testonly = true

  sources = [ "scanning_handler_unittest.cc" ]

  deps = [
    ":scanning",
    "//ash/constants",
    "//base",
    "//content/test:test_support",
    "//testing/gtest",
    "//ui/shell_dialogs",
  ]
}