Add access to user agent for wxWebView

Allow setting a custom user agent for a webview.
Also allow access to the current user agent.
This commit is contained in:
Tobias Taschner
2021-03-16 14:18:52 +01:00
committed by Tobias Taschner
parent d1efcc374b
commit 97e469c255
4 changed files with 57 additions and 3 deletions

View File

@@ -187,6 +187,8 @@ public:
virtual void Print() = 0;
virtual void RegisterHandler(wxSharedPtr<wxWebViewHandler> handler) = 0;
virtual void Reload(wxWebViewReloadFlags flags = wxWEBVIEW_RELOAD_DEFAULT) = 0;
virtual bool SetUserAgent(const wxString& userAgent) { wxUnusedVar(userAgent); return false; }
virtual wxString GetUserAgent() const;
// Script
virtual bool RunScript(const wxString& javascript, wxString* output = NULL) const = 0;