chromium/chromeos/ash/components/language_packs/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("//build/config/chromeos/ui_mode.gni")

assert(is_chromeos_ash, "Non-ChromeOS builds cannot depend on //chromeos/ash")

static_library("language_packs") {
  sources = [
    "diff.cc",
    "diff.h",
    "handwriting.cc",
    "handwriting.h",
    "language_pack_manager.cc",
    "language_pack_manager.h",
    "language_packs_impl.cc",
    "language_packs_impl.h",
    "language_packs_util.cc",
    "language_packs_util.h",
  ]
  deps = [
    "//ash/constants",
    "//base",
    "//chromeos/ash/components/dbus/dlcservice",
    "//chromeos/ash/components/dbus/dlcservice:dlcservice_proto",
    "//chromeos/ash/components/language_packs/public/mojom",
    "//components/language/core/common",
    "//components/prefs:prefs",
    "//components/session_manager:base",
    "//components/session_manager/core:core",
    "//ui/base/ime/ash",
  ]
  public_deps = [ "//third_party/abseil-cpp:absl" ]
}

source_set("unit_tests") {
  testonly = true
  sources = [
    "diff_unittest.cc",
    "handwriting_unittest.cc",
    "language_pack_manager_unittest.cc",
    "language_packs_util_unittest.cc",
    "metrics_unittest.cc",
  ]
  deps = [
    ":language_packs",
    "//ash/constants",
    "//base",
    "//base/test:test_support",
    "//chromeos/ash/components/dbus/dlcservice",
    "//components/prefs",
    "//components/prefs:test_support",
    "//components/session_manager/core:core",
    "//testing/gmock",
    "//testing/gtest",
    "//ui/base:test_support",
    "//ui/base/ime/ash",
  ]
  data = [
    # enums.xml is analyzed by LanguagePackMetricsTest, so this dependency
    # is needed to make commit bots run unit_tests on enums.xml changes.
    "//tools/metrics/histograms/metadata/chromeos/enums.xml",
  ]
}