Skip to content

Commit

Permalink
Update to tao ndk branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Yu-Wei Wu committed May 16, 2022
1 parent 8a61f56 commit 8a2d5ed
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 31 deletions.
8 changes: 1 addition & 7 deletions Cargo.toml
Expand Up @@ -49,7 +49,7 @@ serde_json = "1.0"
thiserror = "1.0"
url = "2.2"
#tao = { version = "0.8.4", default-features = false, features = [ "serde" ] }
tao = {path = "../tao"}
tao = { git = "https://github.com/tauri-apps/tao", branch = "ndk"}
http = "0.2.7"

[dev-dependencies]
Expand Down Expand Up @@ -92,9 +92,3 @@ objc = "0.2"
objc_id = "0.1"

[target."cfg(target_os = \"android\")".dependencies]
android_logger = "0.10"
jni = "0.19"
ndk = "0.6"
ndk-sys = "0.3"
ndk-context = "0.1"
crossbeam-channel = "0.5"
3 changes: 0 additions & 3 deletions src/lib.rs
Expand Up @@ -180,7 +180,4 @@ pub enum Error {
InvalidMethod(#[from] InvalidMethod),
#[error("Infallible error, something went really wrong: {0}")]
Infallible(#[from] std::convert::Infallible),
#[cfg(target_os = "android")]
#[error("JNI error: {0}")]
JNIError(#[from] jni::errors::Error),
}
18 changes: 3 additions & 15 deletions src/webview/android/mod.rs
@@ -1,18 +1,6 @@
use std::{
collections::HashSet, ffi::c_void, os::unix::prelude::RawFd, ptr::null_mut, rc::Rc, sync::RwLock,
};

use crate::{application::window::Window, Result};

use super::{WebContext, WebViewAttributes};

use crossbeam_channel::*;
use jni::{
objects::{JClass, JObject},
sys::jobject,
JNIEnv,
};
use once_cell::sync::{Lazy, OnceCell};
use crate::{application::window::Window, Result};
use std::rc::Rc;
use tao::platform::android::ndk_glue::*;

pub struct InnerWebView {
Expand Down Expand Up @@ -77,7 +65,7 @@ impl InnerWebView {
false
}

pub fn zoom(&self, scale_factor: f64) {}
pub fn zoom(&self, _scale_factor: f64) {}
}

pub fn platform_webview_version() -> Result<String> {
Expand Down
6 changes: 0 additions & 6 deletions src/webview/mod.rs
Expand Up @@ -37,12 +37,6 @@ pub(crate) mod webview2;
#[cfg(target_os = "windows")]
use self::webview2::*;
use crate::Result;
#[cfg(target_os = "android")]
use jni::{
objects::{JClass, JObject},
sys::jobject,
JNIEnv,
};
#[cfg(target_os = "windows")]
use webview2_com::Microsoft::Web::WebView2::Win32::ICoreWebView2Controller;
#[cfg(target_os = "windows")]
Expand Down

0 comments on commit 8a2d5ed

Please sign in to comment.