blob: 74126af8519d26becd99ed465a0e9719ec5c249e [file] [log] [blame]
# Copyright 2018 The Chromium Authors. All rights reserved.
# 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("//build/config/chromeos/ui_mode.gni")
import("//chromeos/assistant/assistant.gni")
assert(is_chromeos_ash)
component("lib") {
output_name = "assistant_service"
friend = [
":tests",
":test_support",
]
defines = [ "IS_ASSISTANT_SERVICE_IMPL" ]
sources = [
"assistant_host.cc",
"assistant_host.h",
"assistant_interaction_logger.cc",
"assistant_interaction_logger.h",
"assistant_manager_service.cc",
"assistant_manager_service.h",
"assistant_manager_service_impl.cc",
"assistant_manager_service_impl.h",
"assistant_settings_impl.cc",
"assistant_settings_impl.h",
"device_settings_host.cc",
"device_settings_host.h",
"libassistant_service_host.h",
"libassistant_service_host_impl.cc",
"libassistant_service_host_impl.h",
"media_host.cc",
"media_host.h",
"media_session/assistant_media_session.cc",
"media_session/assistant_media_session.h",
"platform/audio_devices.cc",
"platform/audio_devices.h",
"platform/audio_input_host.h",
"platform/audio_input_host_impl.cc",
"platform/audio_input_host_impl.h",
"platform/audio_output_delegate_impl.cc",
"platform/audio_output_delegate_impl.h",
"platform/platform_delegate_impl.cc",
"platform/platform_delegate_impl.h",
"service.cc",
"service.h",
"service_context.h",
"timer_host.cc",
"timer_host.h",
]
deps = [
"//ash/components/audio",
"//ash/constants",
"//base",
"//chromeos/assistant:buildflags",
"//chromeos/dbus",
"//chromeos/dbus/power",
"//chromeos/dbus/power:power_manager_proto",
"//chromeos/services/assistant/public/proto",
"//chromeos/services/libassistant/public/mojom",
"//chromeos/strings",
"//components/account_id",
"//components/prefs",
"//components/signin/public/identity_manager",
"//components/user_manager",
"//media/mojo/mojom",
"//services/media_session/public/cpp",
"//ui/accessibility:ax_assistant",
]
if (enable_cros_libassistant) {
deps += [ "//chromeos/services/libassistant" ]
if (enable_libassistant_sandbox) {
deps += [ "//chromeos/services/assistant/public/cpp" ]
}
}
public_deps = [
"//ash/public/cpp:cpp",
"//chromeos/services/assistant/public/cpp",
"//chromeos/services/assistant/public/mojom",
"//chromeos/services/assistant/public/shared",
"//mojo/public/cpp/bindings",
"//services/audio/public/cpp",
]
}
source_set("tests") {
testonly = true
deps = [
":lib",
":test_support",
"//ash/components/audio",
"//ash/constants",
"//ash/public/cpp/assistant/test_support",
"//base",
"//base/test:test_support",
"//chromeos/assistant/test_support",
"//chromeos/dbus:test_support",
"//chromeos/dbus/audio",
"//chromeos/dbus/power",
"//chromeos/services/assistant/public/cpp",
"//chromeos/services/assistant/public/mojom",
"//chromeos/services/libassistant/public/mojom",
"//components/prefs:test_support",
"//components/signin/public/identity_manager",
"//components/signin/public/identity_manager:test_support",
"//mojo/public/cpp/bindings",
"//services/device/public/mojom",
"//services/media_session/public/mojom",
"//services/network:test_support",
"//testing/gmock",
"//testing/gtest",
]
sources = [
"assistant_manager_service_impl_unittest.cc",
"media_host_unittest.cc",
"media_session/assistant_media_session_unittest.cc",
"platform/audio_devices_unittest.cc",
"platform/audio_input_host_unittest.cc",
"service_unittest.cc",
"test_support/fake_service_context.cc",
"test_support/fake_service_context.h",
"test_support/fully_initialized_assistant_state.cc",
"test_support/fully_initialized_assistant_state.h",
"test_support/scoped_assistant_client.cc",
"test_support/scoped_assistant_client.h",
"test_support/scoped_device_actions.cc",
"test_support/scoped_device_actions.h",
]
}
static_library("test_support") {
testonly = true
sources = [
"test_support/fake_assistant_manager_service_impl.cc",
"test_support/fake_assistant_manager_service_impl.h",
"test_support/fake_assistant_settings_impl.cc",
"test_support/fake_assistant_settings_impl.h",
"test_support/fake_libassistant_service.cc",
"test_support/fake_libassistant_service.h",
"test_support/fake_service_controller.cc",
"test_support/fake_service_controller.h",
"test_support/libassistant_media_controller_mock.cc",
"test_support/libassistant_media_controller_mock.h",
"test_support/mock_assistant.cc",
"test_support/mock_assistant.h",
"test_support/mock_assistant_interaction_subscriber.cc",
"test_support/mock_assistant_interaction_subscriber.h",
]
deps = [
":lib",
"//base",
"//chromeos/services/assistant/public/cpp",
"//chromeos/services/assistant/public/mojom",
"//chromeos/services/assistant/public/proto",
"//chromeos/services/assistant/public/shared",
"//chromeos/services/libassistant/public/mojom",
"//mojo/public/cpp/bindings",
"//testing/gmock",
"//testing/gtest",
]
}