cefclient: Add option to create default popups (see issue #3165, see issue #3294)

This change adds a `--use-default-popup` command-line option to cefclient. When
specified, popup windows will be created with default styling (e.g. without an
application-provided native parent window).

This change also adds some reasonable default window bounds in cases where they
are not specified by the client.
This commit is contained in:
Marshall Greenblatt
2022-04-11 16:54:33 -04:00
parent 3000bc8748
commit 75ca552a4e
10 changed files with 46 additions and 6 deletions

View File

@@ -181,6 +181,11 @@ bool MainContextImpl::TouchEventsEnabled() {
return command_line_->GetSwitchValue("touch-events") == "enabled";
}
bool MainContextImpl::UseDefaultPopup() {
return !use_windowless_rendering_ &&
command_line_->HasSwitch(switches::kUseDefaultPopup);
}
void MainContextImpl::PopulateSettings(CefSettings* settings) {
client::ClientAppBrowser::PopulateSettings(command_line_, *settings);