Merge branch 'webview_useragent' of https://github.com/TcT2k/wxWidgets

Add support for custom user agent to wxWebView.

See https://github.com/wxWidgets/wxWidgets/pull/2280
This commit is contained in:
Vadim Zeitlin
2021-03-19 22:39:00 +01:00
11 changed files with 146 additions and 9 deletions

View File

@@ -81,6 +81,7 @@ public:
#if wxUSE_WEBVIEW_WEBKIT2
virtual void EnableAccessToDevTools(bool enable = true) wxOVERRIDE;
virtual bool IsAccessToDevToolsEnabled() const wxOVERRIDE;
virtual bool SetUserAgent(const wxString& userAgent) wxOVERRIDE;
#endif
void SetZoomType(wxWebViewZoomType) wxOVERRIDE;
@@ -176,6 +177,7 @@ private:
#endif
WebKitWebView *m_web_view;
wxString m_customUserAgent;
int m_historyLimit;
wxVector<wxSharedPtr<wxWebViewHandler> > m_handlerList;