blob: 70b9e24ac9855b788bbc78a32b3192585edec113 [file] [log] [blame]
# Copyright 2019 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("//tools/grit/grit_rule.gni")
if (is_fuchsia) {
import("//build/config/fuchsia/generate_runner_scripts.gni")
}
# TODO(crbug.com/1104369): Deprecated. Delete after off-tree clients
# are migrated to use NamedMessagePortConnector directly.
source_set("named_message_port_connector_resources") {
data_deps = [ ":bindings_resources" ]
deps = [ ":bindings_resources" ]
}
# TODO(crbug.com/1104369): Deprecated. Delete after off-tree clients
# are migrated to use NamedMessagePortConnector directly.
grit("bindings_resources") {
source = "bindings_resources.grd"
outputs = [
"grit/resources.h",
"bindings_resources.pak",
]
resource_ids = ""
}
# Transitional target for //components/cast_api_bindings/bindings_manager.
# TODO(crbug.com/1104369): Remove this and replace platform-specific
# subclasses with cross-platform implementation.
source_set("bindings_manager") {
sources = [ "bindings_manager.h" ]
deps = [ "//components/cast/api_bindings:manager" ]
}
if (is_fuchsia) {
source_set("bindings_manager_fuchsia") {
sources = [
"bindings_manager_fuchsia.cc",
"bindings_manager_fuchsia.h",
]
deps = [
":bindings_manager",
"//base",
"//components/cast/message_port",
"//fuchsia:cast_fidl",
"//fuchsia/base",
"//fuchsia/base:message_port",
]
}
}
if (is_linux || is_chromeos || is_android) {
source_set("bindings_manager_cast") {
sources = [
"bindings_manager_cast.cc",
"bindings_manager_cast.h",
"named_message_port_connector_cast.cc",
"named_message_port_connector_cast.h",
]
deps = [
":bindings_manager",
"//base",
"//chromecast/bindings/public/mojom",
"//chromecast/browser:public",
"//components/cast/api_bindings:manager",
"//components/cast/message_port",
"//components/cast/named_message_port_connector",
"//components/on_load_script_injector/browser",
"//mojo/public/cpp/bindings",
"//third_party/blink/public/common",
]
}
source_set("browsertests_cast") {
testonly = true
sources = [ "bindings_manager_cast_browsertest.cc" ]
defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]
data = [ "//chromecast/bindings/testdata" ]
deps = [
"//base",
"//chromecast:chromecast_buildflags",
"//chromecast/base",
"//chromecast/base:chromecast_switches",
"//chromecast/bindings:bindings_manager_cast",
"//chromecast/browser:browser",
"//chromecast/browser:public",
"//components/cast/message_port:test_message_port_receiver",
"//components/cast/named_message_port_connector:resources",
"//content/public/browser",
"//content/test:test_support",
"//net:test_support",
]
}
}
source_set("browsertests") {
testonly = true
deps = []
if (is_linux || is_chromeos || is_android) {
deps += [ "//chromecast/bindings:browsertests_cast" ]
}
}