fix: Isolate plugin's webview browser sessions

This commit is contained in:
Ian Chua
2026-10-12 16:44:24 +08:00
parent e625845b34
commit 0b9b05ed85
14 changed files with 98 additions and 20 deletions
+3 -2
View File
@@ -27,7 +27,8 @@ WebDialog::WebDialog(wxWindow* parent,
SubmitHandler on_submit,
CloseHandler on_close,
CloseHandler on_destroyed,
long wx_style)
long wx_style,
const wxString& profile)
: WebViewHostDialog(parent, wxID_ANY, title, wxDefaultPosition, size, wx_style)
, m_html(html)
, m_on_message(std::move(on_message))
@@ -37,7 +38,7 @@ WebDialog::WebDialog(wxWindow* parent,
{
// A tiny bundled bootstrap page brings the webview up; the real plugin HTML
// is swapped in via SetPage once the bootstrap finishes loading.
create_webview(web_hosting::BOOTSTRAP_PAGE, title, size, wxSize(320, 240));
create_webview(web_hosting::BOOTSTRAP_PAGE, title, size, wxSize(320, 240), profile);
// Paint the window/webview in the themed background so there is no white
// flash before the (transparent) bootstrap page and plugin HTML render.