1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120
|
# 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/buildflag_header.gni")
import("//components/soda/buildflags.gni")
assert(!is_android)
buildflag_header("buildflags") {
header = "buildflags.h"
flags = [ "ENABLE_SODA_INTEGRATION_TESTS=$enable_soda_integration_tests" ]
}
component("soda") {
sources = [
"soda_features.cc",
"soda_features.h",
"soda_installer.cc",
"soda_installer.h",
]
defines = [ "IS_SODA_INSTALLER_IMPL" ]
deps = [
":constants",
"//base",
"//components/live_caption:constants",
"//components/prefs",
"//media",
]
if (is_chromeos) {
sources += [
"soda_installer_impl_chromeos.cc",
"soda_installer_impl_chromeos.h",
]
deps += [
"//ash/constants",
"//chromeos/ash/components/dbus/dlcservice",
"//chromeos/ash/components/dbus/dlcservice:dlcservice_proto",
"//ui/base",
]
}
}
source_set("constants") {
sources = [
"constants.cc",
"constants.h",
"pref_names.cc",
"pref_names.h",
]
deps = [
"//base",
"//components/component_updater:component_updater_paths",
"//components/crx_file",
"//components/language/core/browser",
"//components/prefs:prefs",
"//components/strings/",
"//media",
"//ui/base",
]
}
source_set("utils") {
sources = [
"soda_util.cc",
"soda_util.h",
]
deps = [
":constants",
":soda",
"//base",
"//media",
"//media/mojo/mojom",
"//ui/base",
]
if (is_chromeos) {
deps += [ "//ash/constants:constants" ]
}
}
source_set("unit_tests") {
testonly = true
if (is_chromeos) {
sources = [ "soda_installer_impl_chromeos_unittest.cc" ]
deps = [
":constants",
":soda",
"//ash/constants",
"//chromeos/ash/components/dbus/dlcservice",
"//components/live_caption:constants",
"//components/prefs:test_support",
"//content/test:test_support",
"//testing/gmock",
"//testing/gtest",
]
}
}
static_library("test_support") {
testonly = true
sources = [
"mock_soda_installer.cc",
"mock_soda_installer.h",
]
deps = [
":soda",
"//base",
"//testing/gmock",
]
}
|