Skip to content

Commit

Permalink
jni: Add stop API stub.
Browse files Browse the repository at this point in the history
  • Loading branch information
jdm committed Aug 9, 2018
1 parent 2ceb8dc commit 5b36f82
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ports/libsimpleservo/src/api.rs
Expand Up @@ -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");
Expand Down
6 changes: 6 additions & 0 deletions ports/libsimpleservo/src/capi.rs
Expand Up @@ -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");
Expand Down
6 changes: 6 additions & 0 deletions ports/libsimpleservo/src/jniapi.rs
Expand Up @@ -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");
Expand Down

0 comments on commit 5b36f82

Please sign in to comment.