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.
6 // CML shards intended for tests are used here because this component is
7 // launched as a test. While it doesn't fit the typical use-case for a test
8 // component, it's a useful way to be able to launch the component from a
9 // host tool and have it run somewhere it can get the capabilities it needs
10 // to function correctly.
11 // TODO(crbug.com/1410937): Run as a non-test component.
12 "//build/config/fuchsia/test/chromium_system_test_facet.shard.test-cml",
13 "//build/config/fuchsia/test/elf_test_runner.shard.test-cml",
14 "sys/component/realm_builder_absolute.shard.cml",
16 "syslog/client.shard.cml",
19 binary: "web_engine_shell_exec",
24 // Required in `--use-context-provider` mode.
28 // Required to display the View in Scene Manager unless running in
30 "fuchsia.element.GraphicalPresenter",
32 availability: "optional",
37 // The system ContextProvider is required to create the Context.
38 "fuchsia.web.ContextProvider",
40 availability: "optional",
43 // The remaining are provided from this Component to the `web_instance.cm`
44 // via `CreateContextParams.service_directory`.
47 // Used to hold the cdm_data directory passed to the WebInstance.
51 // The `--use-context-provider` mode does not support
52 // `--enable-web-instance-tmp` so there is no need to `use` "tmp" like
53 // the `offer` when not in `--use-context-provider` mode.
57 // Required capabilities for all WebInstance configurations.
58 "fuchsia.buildinfo.Provider",
59 "fuchsia.device.NameProvider",
60 "fuchsia.fonts.Provider",
61 "fuchsia.hwinfo.Product",
62 "fuchsia.intl.PropertyProvider",
63 // "fuchsia.logger/LogSink", is included by the shard above.
64 "fuchsia.memorypressure.Provider",
65 "fuchsia.process.Launcher",
66 "fuchsia.sysmem.Allocator",
68 // TODO(crbug.com/1421351): Make required when `--use-context-provider`.
69 availability: "optional",
73 // Allows CPU scheduling profiles to be applied to threads to
74 // tune their performance, especially for media rendering.
75 // TODO(crbug.com/1224707): Migrate to `fuchsia.scheduler`.
76 "fuchsia.media.ProfileProvider",
78 // Optionally used by the tracing service.
79 // TODO(crbug.com/1364196): Offer only when enabled.
80 "fuchsia.tracing.perfetto.ProducerConnector",
82 availability: "optional",
86 // Required by `fuchsia.web/ContextFeatureFlags.NETWORK`.
87 "fuchsia.net.interfaces.State",
88 "fuchsia.net.name.Lookup",
89 "fuchsia.posix.socket.Provider",
91 // Required by `fuchsia.web/ContextFeatureFlags.AUDIO`.
92 "fuchsia.media.Audio",
93 "fuchsia.media.AudioDeviceEnumerator",
94 "fuchsia.media.SessionAudioConsumerFactory",
96 // Required by `fuchsia.web/ContextFeatureFlags.VULKAN`.
97 // "fuchsia.tracing.provider.Registry" is optionally used by the
99 "fuchsia.tracing.provider.Registry",
100 "fuchsia.vulkan.loader.Loader",
102 // Required by `fuchsia.web/ContextFeatureFlags.HARDWARE_VIDEO_DECODER`.
103 "fuchsia.mediacodec.CodecFactory",
105 // TODO(crbug.com/1421351): Make required when `--use-context-provider`.
106 availability: "optional",
109 // Required by `fuchsia.web/ContextFeatureFlags.WIDEVINE_CDM` if the value
110 // of the GN arg `enable_widevine` at is true.
111 // TODO(crbug.com/1379411): Use a shard to conditionally `use` based on
112 // the build-time config.
113 protocol: "fuchsia.media.drm.Widevine",
114 availability: "optional",
118 // Required by the absence of `fuchsia.web/ContextFeatureFlags.HEADLESS`
119 // unless running in `--headless` mode.
120 "fuchsia.accessibility.semantics.SemanticsManager",
121 "fuchsia.ui.composition.Allocator",
122 "fuchsia.ui.composition.Flatland",
124 availability: "optional",
128 // Required by `fuchsia.web/ContextFeatureFlags.KEYBOARD`.
129 "fuchsia.ui.input3.Keyboard",
131 // Required by `fuchsia.web/ContextFeatureFlags.VIRTUAL_KEYBOARD`.
132 "fuchsia.input.virtualkeyboard.ControllerCreator",
134 // Required by the absence of
135 // `fuchsia.web/ContextFeatureFlags.DISABLE_DYNAMIC_CODE_GENERATION`.
136 "fuchsia.kernel.VmexResource",
142 // Required capabilities for WebInstanceHost in a child Component.
144 "fuchsia.feedback.ComponentDataRegister",
145 "fuchsia.feedback.CrashReportingProductRegister",
148 to: "#realm_builder",
151 // Offered for use by the relaunched
152 // `fuchsia_web/shell/web_engine_shell_for_web_instance_host.cml`
153 // TODO(crbug.com/1410937): Remove when running as a non-test component and
154 // thus the relaunch is no longer needed.
157 // Required to display the View in Scene Manager unless running in
158 // `--headless` mode.
159 "fuchsia.element.GraphicalPresenter",
162 to: "#realm_builder",
163 availability: "optional",
166 // The remaining are offered from the parent to `web_instance.cm` via
167 // `RealmBuilder` when not in `--use-context-provider` mode.
170 // Used to hold the cdm_data directory passed to web_instance.
173 to: "#realm_builder",
176 // Used when launched with --enable-web-instance-tmp.
179 to: "#realm_builder",
180 availability: "optional",
183 // The chromium test realm offers the system-wide config-data dir to test
184 // components. Route the web_engine sub-directory of this as required by
186 directory: "config-data",
188 as: "config-data-for-web-instance",
189 to: "#realm_builder",
190 subdir: "web_engine",
191 availability: "optional",
194 // Required by `fuchsia.web/ContextFeatureFlags.NETWORK`.
195 directory: "root-ssl-certificates",
197 to: "#realm_builder",
200 // Required capabilities for all WebInstance configurations.
202 "fuchsia.buildinfo.Provider",
203 "fuchsia.device.NameProvider",
204 "fuchsia.fonts.Provider",
205 "fuchsia.hwinfo.Product",
206 "fuchsia.intl.PropertyProvider",
207 // "fuchsia.logger/LogSink", is included by the shard above.
208 "fuchsia.memorypressure.Provider",
209 "fuchsia.process.Launcher",
210 "fuchsia.sysmem.Allocator",
213 to: "#realm_builder",
217 // Allows CPU scheduling profiles to be applied to threads to
218 // tune their performance, especially for media rendering.
219 // TODO(crbug.com/1224707): Migrate to `fuchsia.scheduler`.
220 "fuchsia.media.ProfileProvider",
222 // Optionally used by the tracing service.
223 // TODO(crbug.com/1364196): Offer only when enabled.
224 "fuchsia.tracing.perfetto.ProducerConnector",
227 to: "#realm_builder",
228 availability: "optional",
232 // Required by `fuchsia.web/ContextFeatureFlags.NETWORK`.
233 "fuchsia.net.interfaces.State",
234 "fuchsia.net.name.Lookup",
235 "fuchsia.posix.socket.Provider",
237 // Required by `fuchsia.web/ContextFeatureFlags.AUDIO`.
238 "fuchsia.media.Audio",
239 "fuchsia.media.AudioDeviceEnumerator",
240 "fuchsia.media.SessionAudioConsumerFactory",
242 // Required by `fuchsia.web/ContextFeatureFlags.VULKAN`.
243 // "fuchsia.tracing.provider.Registry" is optionally used by the
245 "fuchsia.tracing.provider.Registry",
246 "fuchsia.vulkan.loader.Loader",
248 // Required by `fuchsia.web/ContextFeatureFlags.HARDWARE_VIDEO_DECODER`.
249 "fuchsia.mediacodec.CodecFactory",
252 to: "#realm_builder",
255 // Required by `fuchsia.web/ContextFeatureFlags.WIDEVINE_CDM` if the value
256 // of the GN arg `enable_widevine` at is true.
257 // TODO(crbug.com/1379411): Use a shard to conditionally `offer` based on
258 // the build-time config.
259 protocol: "fuchsia.media.drm.Widevine",
261 to: "#realm_builder",
262 availability: "optional",
266 // Required by the absence of `fuchsia.web/ContextFeatureFlags.HEADLESS`
267 // unless running in `--headless` mode.
268 "fuchsia.accessibility.semantics.SemanticsManager",
269 "fuchsia.ui.composition.Allocator",
270 "fuchsia.ui.composition.Flatland",
273 to: "#realm_builder",
274 availability: "optional",
278 // Required by `fuchsia.web/ContextFeatureFlags.KEYBOARD`.
279 "fuchsia.ui.input3.Keyboard",
281 // Required by `fuchsia.web/ContextFeatureFlags.VIRTUAL_KEYBOARD`.
282 "fuchsia.input.virtualkeyboard.ControllerCreator",
284 // Required by the absence of
285 // `fuchsia.web/ContextFeatureFlags.DISABLE_DYNAMIC_CODE_GENERATION`.
286 "fuchsia.kernel.VmexResource",
289 to: "#realm_builder",
293 // TODO(crbug.com/1410937): Remove when converting to a non-test component.
295 "deprecated-allowed-packages": [
297 "web_engine_with_webui",