From 300fe1a6f9548a60ec76ea0e74dd057ab6360673 Mon Sep 17 00:00:00 2001 From: Maarten Bent Date: Tue, 28 Jul 2020 20:55:08 +0200 Subject: [PATCH] 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. --- include/wx/webview.h | 6 +++++- interface/wx/webview.h | 14 ++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/include/wx/webview.h b/include/wx/webview.h index 5fb30dc352..53c78122c2 100644 --- a/include/wx/webview.h +++ b/include/wx/webview.h @@ -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[]; diff --git a/interface/wx/webview.h b/interface/wx/webview.h index b2a05d1c26..b870fbfcd2 100644 --- a/interface/wx/webview.h +++ b/interface/wx/webview.h @@ -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; }; /**