| # 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", |
| "//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" ] |
| } |
| } |
| |
| 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", |
| ] |
| } |