cefclient: views: Add overlay BrowserView demo (see #3790)

Adds new `--show-overlay-browser` command-line flag that creates an
overlay containing an Alloy-style BrowserView.  The main BrowserView
may be Chrome- (default) or Alloy-style (add `--use-alloy-style`).
This overlay will only be added to standalone (non-popup) windows.

Popups triggered via the overlay will receive standard Alloy-style
handling in cefclient (e.g. Views-hosted window). Add
`--use-default-popup` for default popup handling.
This commit is contained in:
Marshall Greenblatt
2024-10-07 13:50:16 -04:00
parent e23bf31bf4
commit 1bc1ca15d5
11 changed files with 286 additions and 5 deletions

View File

@@ -134,8 +134,11 @@ scoped_refptr<RootWindow> RootWindowManager::CreateRootWindowAsPopup(
if (MainContext::Get()->UseDefaultPopup() || (is_devtools && !use_views)) {
// Use default window creation for the popup. A new |client| instance is
// still required by cefclient architecture.
client = new DefaultClientHandler();
// required by cefclient architecture if the type is not already
// DefaultClientHandler.
if (!DefaultClientHandler::GetForClient(client)) {
client = new DefaultClientHandler(use_alloy_style);
}
return nullptr;
}