diff --git a/ports/libsimpleservo/src/api.rs b/ports/libsimpleservo/src/api.rs index cf277031024..9305465a724 100644 --- a/ports/libsimpleservo/src/api.rs +++ b/ports/libsimpleservo/src/api.rs @@ -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"); diff --git a/ports/libsimpleservo/src/capi.rs b/ports/libsimpleservo/src/capi.rs index 89ffe408759..d4732f84270 100644 --- a/ports/libsimpleservo/src/capi.rs +++ b/ports/libsimpleservo/src/capi.rs @@ -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"); diff --git a/ports/libsimpleservo/src/jniapi.rs b/ports/libsimpleservo/src/jniapi.rs index 6f8653f774e..591b1d715a2 100644 --- a/ports/libsimpleservo/src/jniapi.rs +++ b/ports/libsimpleservo/src/jniapi.rs @@ -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");