Add wxWebView Edge (Chromium) implementation
This backend requires WebView2 SDK and enables usage of Edge (Chromium) on Windows 7 and newer
This commit is contained in:
committed by
Tobias Taschner
parent
1afeaa324d
commit
6a99e7e273
@@ -23,6 +23,7 @@
|
||||
#include "wx/gtk/webview_webkit.h"
|
||||
#elif defined(__WXMSW__)
|
||||
#include "wx/msw/webview_ie.h"
|
||||
#include "wx/msw/webview_edgec.h"
|
||||
#endif
|
||||
|
||||
// DLL options compatibility check:
|
||||
@@ -32,6 +33,7 @@ WX_CHECK_BUILD_OPTIONS("wxWEBVIEW")
|
||||
extern WXDLLIMPEXP_DATA_WEBVIEW(const char) wxWebViewNameStr[] = "wxWebView";
|
||||
extern WXDLLIMPEXP_DATA_WEBVIEW(const char) wxWebViewDefaultURLStr[] = "about:blank";
|
||||
extern WXDLLIMPEXP_DATA_WEBVIEW(const char) wxWebViewBackendIE[] = "wxWebViewIE";
|
||||
extern WXDLLIMPEXP_DATA_WEBVIEW(const char) wxWebViewBackendEdge[] = "wxWebViewEdge";
|
||||
extern WXDLLIMPEXP_DATA_WEBVIEW(const char) wxWebViewBackendWebKit[] = "wxWebViewWebKit";
|
||||
|
||||
#ifdef __WXMSW__
|
||||
@@ -108,6 +110,14 @@ void wxWebView::InitFactoryMap()
|
||||
if(m_factoryMap.find(wxWebViewBackendIE) == m_factoryMap.end())
|
||||
RegisterFactory(wxWebViewBackendIE, wxSharedPtr<wxWebViewFactory>
|
||||
(new wxWebViewFactoryIE));
|
||||
|
||||
#if wxUSE_WEBVIEW_EDGE
|
||||
if (wxWebViewEdge::IsAvailable() &&
|
||||
m_factoryMap.find(wxWebViewBackendEdge) == m_factoryMap.end())
|
||||
RegisterFactory(wxWebViewBackendEdge, wxSharedPtr<wxWebViewFactory>
|
||||
(new wxWebViewFactoryEdge));
|
||||
#endif
|
||||
|
||||
#else
|
||||
if(m_factoryMap.find(wxWebViewBackendWebKit) == m_factoryMap.end())
|
||||
RegisterFactory(wxWebViewBackendWebKit, wxSharedPtr<wxWebViewFactory>
|
||||
|
Reference in New Issue
Block a user