diff --git a/core/tauri-runtime/src/window.rs b/core/tauri-runtime/src/window.rs index 41609f304b14..d2dfcb8a4b4b 100644 --- a/core/tauri-runtime/src/window.rs +++ b/core/tauri-runtime/src/window.rs @@ -191,10 +191,10 @@ impl<'de> Deserialize<'de> for CursorIcon { } #[cfg(target_os = "android")] -pub struct CreationContext<'a> { - pub env: jni::JNIEnv<'a>, - pub activity: &'a jni::objects::JObject<'a>, - pub webview: &'a jni::objects::JObject<'a>, +pub struct CreationContext<'a, 'b> { + pub env: &'a mut jni::JNIEnv<'b>, + pub activity: &'a jni::objects::JObject<'b>, + pub webview: &'a jni::objects::JObject<'b>, } /// A webview window that has yet to be built. @@ -222,7 +222,7 @@ pub struct PendingWindow> { #[cfg(target_os = "android")] #[allow(clippy::type_complexity)] pub on_webview_created: - Option) -> Result<(), jni::errors::Error> + Send>>, + Option) -> Result<(), jni::errors::Error> + Send>>, pub web_resource_request_handler: Option>, } @@ -310,7 +310,7 @@ impl> PendingWindow { #[cfg(target_os = "android")] pub fn on_webview_created< - F: Fn(CreationContext<'_>) -> Result<(), jni::errors::Error> + Send + 'static, + F: Fn(CreationContext<'_, '_>) -> Result<(), jni::errors::Error> + Send + 'static, >( mut self, f: F, diff --git a/core/tauri/src/manager.rs b/core/tauri/src/manager.rs index 4fa6a41f99b1..ddf05e1ad8db 100644 --- a/core/tauri/src/manager.rs +++ b/core/tauri/src/manager.rs @@ -1153,7 +1153,7 @@ impl WindowManager { #[cfg(target_os = "android")] { - pending = pending.on_webview_created(move |mut ctx| { + pending = pending.on_webview_created(move |ctx| { let plugin_manager = ctx .env .call_method( diff --git a/examples/api/src-tauri/Cargo.lock b/examples/api/src-tauri/Cargo.lock index 2aca6f4096c6..5dcf0cc7993a 100644 --- a/examples/api/src-tauri/Cargo.lock +++ b/examples/api/src-tauri/Cargo.lock @@ -1611,20 +1611,6 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" -[[package]] -name = "html5ever" -version = "0.25.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5c13fb08e5d4dfc151ee5e88bae63f7773d61852f3bdc73c9f4b9e1bde03148" -dependencies = [ - "log", - "mac", - "markup5ever 0.10.1", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "html5ever" version = "0.26.0" @@ -1633,7 +1619,7 @@ checksum = "bea68cab48b8459f17cf1c944c67ddc572d272d9f2b274140f223ecb1da4a3b7" dependencies = [ "log", "mac", - "markup5ever 0.11.0", + "markup5ever", "proc-macro2", "quote", "syn 1.0.109", @@ -1950,18 +1936,6 @@ dependencies = [ "unicode-segmentation", ] -[[package]] -name = "kuchiki" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ea8e9c6e031377cff82ee3001dc8026cdf431ed4e2e6b51f98ab8c73484a358" -dependencies = [ - "cssparser", - "html5ever 0.25.2", - "matches", - "selectors", -] - [[package]] name = "kuchikiki" version = "0.8.2" @@ -1969,7 +1943,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f29e4755b7b995046f510a7520c42b2fed58b77bd94d5a87a8eb43d2fd126da8" dependencies = [ "cssparser", - "html5ever 0.26.0", + "html5ever", "indexmap 1.9.3", "matches", "selectors", @@ -2091,20 +2065,6 @@ dependencies = [ "libc", ] -[[package]] -name = "markup5ever" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a24f40fb03852d1cdd84330cddcaf98e9ec08a7b7768e952fad3b4cf048ec8fd" -dependencies = [ - "log", - "phf 0.8.0", - "phf_codegen 0.8.0", - "string_cache", - "string_cache_codegen", - "tendril", -] - [[package]] name = "markup5ever" version = "0.11.0" @@ -3374,7 +3334,7 @@ dependencies = [ [[package]] name = "tao" version = "0.21.1" -source = "git+https://github.com/tauri-apps/tao?branch=dev#d0b20c94eaf555ba27f3cfbbf2636e3f3b036a97" +source = "git+https://github.com/tauri-apps/tao?branch=dev#448ec06c0f852c52d84f40505c8ae4f65ace0637" dependencies = [ "bitflags 1.3.2", "cairo-rs", @@ -3422,7 +3382,7 @@ dependencies = [ [[package]] name = "tao-macros" version = "0.1.1" -source = "git+https://github.com/tauri-apps/tao?branch=dev#d0b20c94eaf555ba27f3cfbbf2636e3f3b036a97" +source = "git+https://github.com/tauri-apps/tao?branch=dev#448ec06c0f852c52d84f40505c8ae4f65ace0637" dependencies = [ "proc-macro2", "quote", @@ -3634,7 +3594,7 @@ dependencies = [ "getrandom 0.2.10", "glob", "heck", - "html5ever 0.26.0", + "html5ever", "infer 0.12.0", "json-patch", "kuchikiki", @@ -4568,8 +4528,8 @@ dependencies = [ [[package]] name = "wry" -version = "0.29.0" -source = "git+https://github.com/tauri-apps/wry?branch=tao-v0.22#c9340fa557e6efa225747d4ef4476c957ebe97fc" +version = "0.30.0" +source = "git+https://github.com/tauri-apps/wry?branch=tao-v0.22#f3bc82c16b3ba4978f46a9b6762e079854aaf188" dependencies = [ "base64", "block", @@ -4581,10 +4541,10 @@ dependencies = [ "gio", "glib", "gtk", - "html5ever 0.25.2", + "html5ever", "http", "javascriptcore-rs", - "kuchiki", + "kuchikiki", "libc", "log", "objc",