chromium/ash/webui/scanning/mojom/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("//mojo/public/tools/bindings/mojom.gni")

assert(is_chromeos_ash)

mojom("mojom") {
  sources = [ "scanning.mojom" ]

  webui_module_path = "/ash/webui/scanning"

  public_deps = [ "//mojo/public/mojom/base" ]

  cpp_typemaps = [
    {
      types = [
        {
          mojom = "ash.scanning.mojom.ScanResult"
          cpp = "::lorgnette::ScanFailureMode"
        },
      ]
      traits_headers = [
        "scanning_type_converters.h",
        "//chromeos/ash/components/dbus/lorgnette/lorgnette_service.pb.h",
      ]
      traits_sources = [ "scanning_type_converters.cc" ]
      traits_public_deps =
          [ "//chromeos/ash/components/dbus/lorgnette_manager:lorgnette_proto" ]
    },
  ]
}
source_set("unit_tests") {
  testonly = true
  sources = [ "scanning_type_converters_unittest.cc" ]
  deps = [
    ":mojom",
    "//base",
    "//base/test:test_support",
    "//chromeos/ash/components/dbus/lorgnette_manager:lorgnette_proto",
    "//content/test:test_support",
    "//services/data_decoder/public/cpp:test_support",
    "//services/device/public/cpp:test_support",
    "//testing/gtest",
    "//ui/gfx",
    "//ui/shell_dialogs",
    "//ui/webui",
  ]
}