ENH: [STUDIO-1647] use WebView2 put_UserAgent

Change-Id: Ifae6589892353adb4b940fbe77d7d0f9521330dc
This commit is contained in:
chunmao.guo 2022-12-09 10:35:36 +08:00 committed by Lane.Wei
parent a953442c9e
commit d164889aa4
4 changed files with 46 additions and 49 deletions

View file

@ -88,20 +88,6 @@ WebViewPanel::WebViewPanel(wxWindow *parent)
topsizer->Add(m_browser, wxSizerFlags().Expand().Proportion(1));
Bind(EVT_WEBVIEW_RECREATED, [this](auto &evt) {
#ifdef __WXMSW__
m_browser = dynamic_cast<wxWebView *>(evt.GetEventObject());
if (m_browser == nullptr) {
wxLogError("Could not recreate browser");
return;
}
GetSizer()->Add(m_browser, wxSizerFlags().Expand().Proportion(1));
GetSizer()->Layout();
#else
(void) this;
#endif
});
// Log backend information
if (wxGetApp().get_mode() == comDevelop) {
wxLogMessage(wxWebView::GetBackendVersionInfo().ToString());