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

@@ -280,8 +280,8 @@ void CefBrowserViewImpl::AddedToWidget() {
CefWidget* cef_widget = CefWidget::GetForWidget(widget);
DCHECK(cef_widget);
if (!browser_) {
if (cef_widget->IsAlloyStyle() && !is_alloy_style_) {
if (!browser_ && !is_alloy_style_) {
if (cef_widget->IsAlloyStyle()) {
LOG(ERROR) << "Cannot add Chrome style BrowserView to Alloy style Window";
return;
}