1 # Copyright 2022 The Chromium Authors
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
7 import("//build/config/fuchsia/generate_runner_scripts.gni")
8 import("//third_party/fuchsia-gn-sdk/src/component.gni")
9 import("//third_party/fuchsia-gn-sdk/src/package.gni")
11 # Nothing else should depend on these targets except the final component.
19 "//fuchsia_web:gn_all",
21 deps = [ ":web_engine_shell" ]
23 if (enable_cast_receiver) {
24 deps += [ ":cast_streaming_shell" ]
28 source_set("remote_debugging_port") {
30 "remote_debugging_port.cc",
31 "remote_debugging_port.h",
36 source_set("present_frame") {
44 "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.element",
45 "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.web",
49 fuchsia_component("web_engine_shell_component") {
51 manifest = "web_engine_shell.cml"
52 data_deps = [ ":web_engine_shell_exec" ]
55 # WebInstanceHost needs to serve capabilities to web_instance. Since the
56 # primary web_engine_shell component is a test component, it is not able to do
57 # this directly. Instead, it launches this here component to start instances via
59 fuchsia_component("web_engine_shell_for_web_instance_host_component") {
61 manifest = "web_engine_shell_for_web_instance_host.cml"
62 data_deps = [ ":web_engine_shell_exec" ]
65 fuchsia_package("web_engine_shell_pkg") {
68 # TODO(fxbug.dev/100944): Add appropriate visibility when fixed.
69 package_name = "web_engine_shell"
71 ":web_engine_shell_component",
72 ":web_engine_shell_for_web_instance_host_component",
76 fuchsia_package_installer("web_engine_shell") {
78 package = ":web_engine_shell_pkg"
79 package_name = "web_engine_shell"
82 "//fuchsia_web/webengine:web_engine",
86 "//fuchsia_web/webengine:web_engine_with_webui",
87 "web_engine_with_webui",
92 executable("web_engine_shell_exec") {
94 sources = [ "web_engine_shell.cc" ]
100 ":remote_debugging_port",
103 "//components/fuchsia_component_support:annotations_manager",
104 "//fuchsia_web/common",
105 "//fuchsia_web/webinstance_host:webinstance_host",
106 "//third_party/fuchsia-sdk/sdk/pkg/fdio",
107 "//third_party/fuchsia-sdk/sdk/pkg/fidl_cpp",
108 "//third_party/fuchsia-sdk/sdk/pkg/sys_cpp",
109 "//third_party/widevine/cdm:buildflags",
114 source_set("shell_relauncher") {
116 public = [ "shell_relauncher.h" ]
117 sources = [ "shell_relauncher.cc" ]
120 "//third_party/abseil-cpp:absl",
123 "//fuchsia_web/common/test:test_support",
124 "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.component:fuchsia.component_hlcpp",
125 "//third_party/fuchsia-sdk/sdk/pkg/sys_component_cpp_testing",
129 if (enable_cast_receiver) {
130 fuchsia_component("cast_streaming_shell_component") {
132 manifest = "cast_streaming_shell.cml"
133 data_deps = [ ":cast_streaming_shell_exe" ]
136 # WebInstanceHost needs to serve capabilities to child components, which is
137 # not possible when running inside a test component, such as
138 # cast_streaming_shell. The shell therefore uses an intermediate component to
139 # actually run the WebInstanceHost, from which the capabilities can be served.
140 fuchsia_component("cast_streaming_shell_for_web_instance_host_component") {
142 manifest = "cast_streaming_shell_for_web_instance_host.cml"
143 data_deps = [ ":cast_streaming_shell_exe" ]
146 fuchsia_package("cast_streaming_shell_pkg") {
148 package_name = "cast_streaming_shell"
150 ":cast_streaming_shell_component",
151 ":cast_streaming_shell_for_web_instance_host_component",
155 fuchsia_package_installer("cast_streaming_shell") {
157 package = ":cast_streaming_shell_pkg"
158 package_name = "cast_streaming_shell"
160 "//fuchsia_web/webengine:web_engine",
165 executable("cast_streaming_shell_exe") {
167 sources = [ "cast_streaming_shell.cc" ]
170 "cast_streaming_shell_data",
171 rebase_path("//media/test/data/bear-1280x720.ivf"),
176 ":remote_debugging_port",
179 "//base/test:test_support",
180 "//components/cast/message_port:message_port",
181 "//components/cast_streaming/test:test_sender_using_net_sockets",
182 "//components/fuchsia_component_support:annotations_manager",
183 "//fuchsia_web/cast_streaming",
184 "//fuchsia_web/common",
185 "//fuchsia_web/common/test:test_support",
186 "//fuchsia_web/webengine:switches",
187 "//fuchsia_web/webinstance_host:webinstance_host",
189 "//media/gpu/test:test_helpers",
190 "//third_party/fuchsia-sdk/sdk/pkg/fdio",
191 "//third_party/fuchsia-sdk/sdk/pkg/sys_cpp",