Add GeckoView.stop() draft
authorJames Willcox <snorp@snorp.net>
Wed, 26 Apr 2017 12:11:38 -0500
changeset 568961 309b8dc72d72cd9bbdc6c7af3657fa827db919c1
parent 568960 0e9779956ce1b21fc406902b57c22e527b6a0bbc
child 568962 c14a224007240c01f9c69eb862c0941cc86602fb
push id56033
push userbmo:snorp@snorp.net
push dateWed, 26 Apr 2017 20:29:44 +0000
milestone55.0a1
Add GeckoView.stop() MozReview-Commit-ID: 7MmayThnVQ0
mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoView.java
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoView.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoView.java
@@ -421,16 +421,23 @@ public class GeckoView extends LayerView
         if (GeckoThread.isRunning()) {
             mWindow.loadUri(uri, flags);
         }  else {
             GeckoThread.queueNativeCall(mWindow, "loadUri", String.class, uri, flags);
         }
     }
 
     /**
+    * Stop any load that is in progress
+    */
+    public void stop() {
+        mEventDispatcher.dispatch("GeckoView:Stop", null);
+    }
+
+    /**
     * Load the given URI.
     * @param uri The URI of the resource to load.
     */
     public void loadUri(String uri) {
         final GeckoBundle msg = new GeckoBundle();
         msg.putString("uri", uri);
         mEventDispatcher.dispatch("GeckoView:LoadUri", msg);
     }