blob: d38e7f792e711b793752b18c4c86dcc0d3ab3a29 [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("//chromeos/assistant/assistant.gni")
assert(is_chromeos)
assert(enable_cros_assistant)
component("lib") {
output_name = "assistant_service"
friend = [
":tests",
":test_support",
]
defines = [ "IS_ASSISTANT_SERVICE_IMPL" ]
sources = [
"assistant_manager_service.h",
"assistant_settings_manager.h",
"constants.cc",
"constants.h",
"fake_assistant_manager_service_impl.cc",
"fake_assistant_manager_service_impl.h",
"fake_assistant_settings_manager_impl.cc",
"fake_assistant_settings_manager_impl.h",
"service.cc",
"service.h",
]
deps = [
"//base",
"//build/util:webkit_version",
"//chromeos/assistant:buildflags",
"//chromeos/audio",
"//chromeos/dbus",
"//chromeos/dbus:power_manager_proto",
"//components/account_id",
"//services/device/public/mojom",
"//services/identity/public/mojom",
"//services/network/public/cpp:cpp",
"//ui/accessibility:ax_assistant",
]
public_deps = [
"//ash/public/cpp:cpp",
"//chromeos/services/assistant/public:feature_flags",
"//chromeos/services/assistant/public/mojom",
"//mojo/public/cpp/bindings:bindings",
"//services/audio/public/cpp:cpp",
"//services/service_manager/public/cpp:cpp",
]
if (enable_cros_libassistant) {
sources += [
"assistant_manager_service_impl.cc",
"assistant_manager_service_impl.h",
"assistant_settings_manager_impl.cc",
"assistant_settings_manager_impl.h",
"chromium_api_delegate.cc",
"chromium_api_delegate.h",
"chromium_http_connection.cc",
"chromium_http_connection.h",
"default_url_request_context_getter.cc",
"default_url_request_context_getter.h",
"media_session/assistant_media_session.cc",
"media_session/assistant_media_session.h",
"platform/audio_input_impl.cc",
"platform/audio_input_impl.h",
"platform/audio_input_provider_impl.cc",
"platform/audio_input_provider_impl.h",
"platform/audio_media_data_source.cc",
"platform/audio_media_data_source.h",
"platform/audio_output_provider_impl.cc",
"platform/audio_output_provider_impl.h",
"platform/audio_stream_handler.cc",
"platform/audio_stream_handler.h",
"platform/file_provider_impl.cc",
"platform/file_provider_impl.h",
"platform/network_provider_impl.cc",
"platform/network_provider_impl.h",
"platform/system_provider_impl.cc",
"platform/system_provider_impl.h",
"platform_api_impl.cc",
"platform_api_impl.h",
"utils.cc",
"utils.h",
]
deps += [
"//chromeos/assistant/internal",
"//chromeos/assistant/internal:build_libassistant",
"//chromeos/assistant/internal/proto/google3",
"//chromeos/resources",
"//chromeos/services/assistant/public/proto",
"//chromeos/strings",
"//libassistant/shared/internal_api:fuchsia_api_helper",
"//libassistant/shared/internal_api/c:api_wrappers_entrypoint",
"//libassistant/shared/public",
"//libassistant/shared/public:export",
"//net",
"//services/media_session/public/cpp",
"//services/media_session/public/mojom",
"//services/network/public/cpp",
"//services/network/public/mojom",
"//ui/base",
"//url",
]
libs = [ "$root_out_dir/libassistant.so" ]
}
}
source_set("tests") {
testonly = true
deps = [
":lib",
"//base",
"//base/test:test_support",
"//chromeos/dbus:test_support",
"//chromeos/services/assistant/public/mojom",
"//mojo/public/cpp/bindings:bindings",
"//services/device/public/mojom",
"//services/identity/public/mojom",
"//services/network:test_support",
"//services/network/public/cpp:cpp",
"//services/service_manager/public/cpp",
"//services/service_manager/public/cpp/test:test_support",
"//testing/gmock",
"//testing/gtest",
]
sources = [
"service_unittest.cc",
]
if (enable_cros_libassistant) {
sources += [
"platform/audio_output_provider_impl_unittest.cc",
"platform/system_provider_impl_unittest.cc",
]
deps += [ "//libassistant/shared/public" ]
}
}
static_library("test_support") {
testonly = true
sources = [
"test_support/mock_assistant.cc",
"test_support/mock_assistant.h",
]
deps = [
"//base",
"//chromeos/services/assistant/public/mojom",
"//testing/gmock",
]
}