jni: Add stop API stub.

This commit is contained in:
Josh Matthews 2018-08-02 17:03:15 -04:00
parent 2ceb8dcd22
commit 5b36f82c74
3 changed files with 18 additions and 0 deletions

View file

@ -194,6 +194,12 @@ impl ServoGlue {
self.process_event(event)
}
/// Stop loading the page.
pub fn stop(&mut self) -> Result<(), &'static str> {
debug!("TODO can't stop won't stop");
Ok(())
}
/// Go back in history.
pub fn go_back(&mut self) -> Result<(), &'static str> {
debug!("go_back");

View file

@ -138,6 +138,12 @@ pub extern "C" fn reload() {
call(|s| s.reload());
}
#[no_mangle]
pub extern "C" fn stop() {
debug!("stop");
call(|s| s.stop());
}
#[no_mangle]
pub extern "C" fn go_back() {
debug!("go_back");

View file

@ -139,6 +139,12 @@ pub fn Java_com_mozilla_servoview_JNIServo_reload(env: JNIEnv, _class: JClass) {
call(env, |s| s.reload());
}
#[no_mangle]
pub fn Java_com_mozilla_servoview_JNIServo_stop(env: JNIEnv, _class: JClass) {
debug!("stop");
call(env, |s| s.stop());
}
#[no_mangle]
pub fn Java_com_mozilla_servoview_JNIServo_goBack(env: JNIEnv, _class: JClass) {
debug!("goBack");