WebViewEdge: Allow edge webview2 installation during runtime

Check if edge webview runtime is available in the call to
wxWebView::IsBackendAvailable() instead of only doing it during
process initialization. This allows an application to install
the Edge WebView2 Runtime during runtime and use the edge webview
afterwards without restarting the process.
This commit is contained in:
Tobias Taschner
2020-11-05 09:47:58 +01:00
parent 2d9c08e0cc
commit 46d123b953
6 changed files with 37 additions and 25 deletions

View File

@@ -119,6 +119,7 @@ public:
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxASCII_STR(wxWebViewNameStr)) = 0;
virtual bool IsAvailable() { return true; }
};
WX_DECLARE_STRING_HASH_MAP(wxSharedPtr<wxWebViewFactory>, wxStringWebViewFactoryMap);