Convert app banners to use Mojo.
This CL converts the app banner system from Chrome IPC to Mojo and moves
all banner code from chrome/renderer to Blink. It also substantially
improves the layout test coverage for the BeforeInstallPromptEvent,
fixing various renderer crash bugs that are covered by the tests.
The key change is that the browser-side AppBannerManager makes a Mojo
request to Blink, which is intercepted by the WebLocalFrame and rerouted
to the AppBannerController. The AppBannerManager passes a bound
InterfaceRequest/Ptr in the Mojo request, which are used to create a
bound BeforeInstallPromptEvent. This ensures that when a
BeforeInstallPromptEvent is created, it already has a browser connection,
and does not need another asynchronous (and possibly racey) call to
establish full two-way communication with the browser process.
Several files in Blink's modules/app_banner directories that were solely
required for the AppBannerClient layer in chrome/renderer are deleted.
The existing layout tests are simplified by removing request_ids and
eliminating the AppBannerClient from ContentRendererClients. This
requires a dependency on content/public/common from
components/test_runner to allow a shim mojom::AppBannerService to be
injected.
[email protected] is added to OWNERS for the Blink-side app
banner code.
BUG=499704,655877,655902
Review-Url: https://codereview.chromium.org/2393513004
Cr-Commit-Position: refs/heads/master@{#428238}
diff --git a/components/test_runner/test_runner.h b/components/test_runner/test_runner.h
index f6d2d80..532868b 100644
--- a/components/test_runner/test_runner.h
+++ b/components/test_runner/test_runner.h
@@ -522,9 +522,8 @@
const GURL& origin,
const GURL& embedding_origin);
- // Resolve the beforeinstallprompt event with the matching request id.
- void ResolveBeforeInstallPromptPromise(int request_id,
- const std::string& platform);
+ // Resolve the in-flight beforeinstallprompt event.
+ void ResolveBeforeInstallPromptPromise(const std::string& platform);
// Calls setlocale(LC_ALL, ...) for a specified locale.
// Resets between tests.