Add option to wxWebViewHandler to set a custom security URL

This will be used by wxWebViewIE to modify the security URL and domain when
parsing a URL.
This commit is contained in:
Maarten Bent 2020-07-28 20:55:08 +02:00
parent bcadef5e2c
commit 300fe1a6f9
2 changed files with 19 additions and 1 deletions

View File

@ -89,12 +89,16 @@ enum wxWebViewNavigationActionFlags
class WXDLLIMPEXP_WEBVIEW wxWebViewHandler
{
public:
wxWebViewHandler(const wxString& scheme) : m_scheme(scheme) {}
wxWebViewHandler(const wxString& scheme)
: m_scheme(scheme), m_securityURL() {}
virtual ~wxWebViewHandler() {}
virtual wxString GetName() const { return m_scheme; }
virtual wxFSFile* GetFile(const wxString &uri) = 0;
virtual void SetSecurityURL(const wxString& url) { m_securityURL = url; }
virtual wxString GetSecurityURL() const { return m_securityURL; }
private:
wxString m_scheme;
wxString m_securityURL;
};
extern WXDLLIMPEXP_DATA_WEBVIEW(const char) wxWebViewNameStr[];

View File

@ -252,6 +252,20 @@ public:
@return The name of the scheme, as passed to the constructor.
*/
virtual wxString GetName() const;
/**
Sets a custom security URL. Only used by wxWebViewIE.
@since 3.1.5
*/
virtual void SetSecurityURL(const wxString& url);
/**
@return The custom security URL. Only used by wxWebViewIE.
@since 3.1.5
*/
virtual wxString GetSecurityURL() const;
};
/**