# 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/config/chromeos/ui_mode.gni")
assert(is_chromeos, "Non-ChromeOS builds cannot depend on //chromeos")
component("cdm_factory_daemon_browser") {
sources = [
"cdm_factory_daemon_proxy.cc",
"cdm_factory_daemon_proxy.h",
]
public_deps = [ "//chromeos/components/cdm_factory_daemon/mojom" ]
deps = [
"//base",
"//build:chromeos_buildflags",
"//content/public/browser",
"//mojo/public/cpp/bindings",
]
if (is_chromeos_lacros) {
sources += [
"cdm_factory_daemon_proxy_lacros.cc",
"cdm_factory_daemon_proxy_lacros.h",
]
deps += [
"//chromeos/crosapi/mojom",
"//chromeos/lacros",
]
}
if (is_chromeos_ash) {
sources += [
"cdm_factory_daemon_proxy_ash.cc",
"cdm_factory_daemon_proxy_ash.h",
"output_protection_impl.cc",
"output_protection_impl.h",
]
deps += [
"//ash",
"//chromeos/ash/components/dbus/cdm_factory_daemon",
"//ui/display/manager",
]
}
defines = [ "IS_CDM_FACTORY_DAEMON_IMPL" ]
}
component("cdm_factory_daemon_gpu") {
sources = [
"cdm_storage_adapter.cc",
"cdm_storage_adapter.h",
"chromeos_cdm_context.h",
"chromeos_cdm_factory.cc",
"chromeos_cdm_factory.h",
"content_decryption_module_adapter.cc",
"content_decryption_module_adapter.h",
"remote_cdm_context.cc",
"remote_cdm_context.h",
"stable_cdm_context_impl.cc",
"stable_cdm_context_impl.h",
]
public_deps = [
"//chromeos/components/cdm_factory_daemon/mojom",
"//media/mojo/mojom",
]
deps = [
"//base",
"//media/mojo/mojom/stable:stable_video_decoder",
"//mojo/public/cpp/bindings",
]
defines = [ "IS_CDM_FACTORY_DAEMON_IMPL" ]
}
source_set("unit_tests") {
testonly = true
sources = [
"cdm_storage_adapter_unittest.cc",
"content_decryption_module_adapter_unittest.cc",
"output_protection_impl_unittest.cc",
]
deps = [
":cdm_factory_daemon_browser",
":cdm_factory_daemon_gpu",
"//base",
"//base/test:test_support",
"//chromeos/components/cdm_factory_daemon/mojom",
"//chromeos/components/cdm_factory_daemon/mojom:unit_tests",
"//content/test:test_support",
"//media:test_support",
"//mojo/public/cpp/bindings",
"//testing/gmock",
"//testing/gtest",
"//ui/display:test_support",
]
}