Commit Graph

24 Commits

Author SHA1 Message Date
Tobias Taschner
2487a48b66 Implement user agent access for Edge 2021-03-17 22:01:46 +01:00
Tobias Taschner
80c04e3941 Merge branch 'master' into webview_script_message 2021-03-01 09:57:13 +01:00
Maarten Bent
fc3cfb67cf Add missing UUIDs for wxWebViewEdge 2021-03-01 00:09:23 +01:00
nns52k
df20e5ec76 Fix case of WebView2.h in the #inclue directive
Using the correct case is important when using case-sensitive file
systems as when cross-compiling, for example.
2021-03-01 00:08:08 +01:00
Tobias Taschner
29bfcdfd5e Add common web message identifier 2021-02-27 11:55:50 +01:00
Tobias Taschner
4d78437a77 Implement AddUserScript() for edge backend 2021-02-26 23:41:39 +01:00
Tobias Taschner
2d007ff3f1 Add named script handler to edge 2021-02-26 21:51:15 +01:00
Tobias Taschner
edcaf5210e Implement script message for edge backend 2021-02-26 15:41:42 +01:00
Tobias Taschner
f6a23a0431 Add wxEVT_WEBVIEW_FULLSCREEN_CHANGED event
The event is triggered by wxWebView when the page requests fullscreen view.

It's currently only implemented for the edge backend.
2021-02-09 22:28:29 +01:00
Tobias Taschner
fea23a0be4 Handle in-document navigation with wxWebViewEdge
Send EVT_WEBVIEW_NAVIGATING, EVT_WEBVIEW_NAVIGATED and EVT_WEBVIEW_LOADED
when an anchor is clicked within a document. This kind of navigation
cannot be vetoed.

Fixes: #19074
2021-02-09 17:55:37 +01:00
Tobias Taschner
0d82348328 Add wxWebView::GetBackendVersionInfo()
Allows to get the WebView backend version if available
Currently implemented for IE, Edge and webkit2.
2021-02-05 22:18:28 +01:00
Tobias Taschner
489afb3336 Allow using a fixed version with wxWebViewEdge
A fixed version may be distributed with the application
and wxWebViewEdge::MSWSetBrowserExecutableDir() allows
it's usage with wxWebViewEdge.
2021-02-05 22:18:28 +01:00
Vadim Zeitlin
bc825de1fe Simplify and make more robust wxWebViewEdge initialization
Get rid of ms_isInitialized as it must be kept synchronized with
ms_loaderDll.IsLoaded() anyhow, and it's simpler to not have it at all
rather than ensuring this.

Also ensure that calling Initialize() again, after doing it first
unsuccessfully, doesn't assert because ms_loaderDll is already loaded,
by only leaving it with a valid handle if the initialization succeeded.

Closes #19041.
2021-01-25 00:15:24 +01:00
Tobias Taschner
46d123b953 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.
2020-11-06 09:19:17 +01:00
Tobias Taschner
412de05407 Allow settings modification before WebView Edge init
Setting EnableContextMenu and EnableAccessToDevTools where
ignored before the webview loaded content. This would often
be set directly after creation and work like this with other
backends.
2020-11-06 09:19:11 +01:00
Vadim Zeitlin
fca9460522 Fix typo in wxWebViewEdgeImpl::Uninitialize() name
As this is a private header, we can fix this without any compatibility
concerns.

Thanks codespell for finding it.
2020-06-27 22:56:22 +02:00
Tobias Taschner
7d1c40ecf5 Updated wxWebViewEdge for SDK to 0.9.488
Requires Edge 84.0.488.0 or newer

Another SDK release before 1.0 includes some
breaking changes regarding naming
2020-04-20 23:00:10 +02:00
Vadim Zeitlin
9203f685ee Check the expected WebView2 interface is defined
This results in a single intelligible error instead of a hundred of less
clear ones in case our code is compiled against an out of date SDK
version.

There doesn't seem to be any way to check the version directly, so just
check that the interface which hadn't been defined in the previous
version is defined now to check for it indirectly.
2020-03-11 19:26:39 +01:00
Tobias Taschner
613687ecb5 Updated wxWebViewEdge for SDK 0.9.430
This first beta release of the WebView2 SDK has many identifiers
renamed and webview interfaces split to Host and WebView.

Closes https://github.com/wxWidgets/wxWidgets/pull/1743
2020-02-29 15:40:45 +01:00
Tobias Taschner
1a72654d69 Send wxEVT_WEBVIEW_LOADED 2020-01-16 19:59:37 +01:00
Tobias Taschner
a19270df8f Implement title changed event 2020-01-16 10:26:14 +01:00
Tobias Taschner
41f4a21736 Apply suggestions from code review
Co-Authored-By: Maarten <MaartenBent@users.noreply.github.com>
2020-01-16 10:15:11 +01:00
Tobias Taschner
964992e7ff Move WebView2 event handling from lambdas to functions 2020-01-15 21:51:58 +01:00
Tobias Taschner
bbde6e2e88 Move wxWebViewEdge implementation to private header 2020-01-15 21:23:37 +01:00