We are adding experimental infrastructure to allow WebUI renderer processes to load resources without needing to communicate with the browser process.
Rationale Design sketchIn our prototype, we added a URLLoaderFactory-like thing in Blink. This is an object that lives in the renderer process and responds to URL requests with data retrieved from the ResourceBundle.
Prototype (see local_resource_url_loader_factory.cc)
This causes presubmit to warn that we are using disallowed types in Blink.
Presubmit warnings. Some warnings are about using existing types in Blink, e.g. network::ResourceRequest. Some are about using the non-Blink variant of our own type, mojom::LocalResourceLoaderConfigPtr. We used the non-Blink variant because this object is initially passed from the browser.
What is the recommended way to structure this change? Should we:
- Move the URLLoaderFactory-like thing out of Blink
- Leave the URLLoaderFactory-like thing in Blink and fix it to use only allowed types (e.g. unmarshal the non-Blink variant LocalResourceLoaderConfig or convert to the Blink variant)
- Update the presubmit to allow these types
Thanks!