Bug 1440592 - [3.0] Rename GeckoView event onLoadURI to onLoadRequest. r=snorp
authorEugen Sawin <esawin@mozilla.com>
Fri, 09 Mar 2018 19:17:37 +0100
changeset 407372 7f0371f3d5f7c570db6f8bfa6a7dfc7636498aa4
parent 407371 80169b0256617adc6be618a203bd01d6f2dd9499
child 407373 adcbaef0b0148559d5992697438210f61553b539
push id100658
push useresawin@mozilla.com
push dateFri, 09 Mar 2018 18:43:02 +0000
treeherdermozilla-inbound@7f0371f3d5f7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssnorp
bugs1440592
milestone60.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1440592 - [3.0] Rename GeckoView event onLoadURI to onLoadRequest. r=snorp
mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoSession.java
mobile/android/modules/geckoview/LoadURIDelegate.jsm
--- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoSession.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoSession.java
@@ -118,17 +118,17 @@ public class GeckoSession extends LayerS
             }
         };
 
     private final GeckoSessionHandler<NavigationDelegate> mNavigationHandler =
         new GeckoSessionHandler<NavigationDelegate>(
             "GeckoViewNavigation", this,
             new String[]{
                 "GeckoView:LocationChange",
-                "GeckoView:OnLoadUri",
+                "GeckoView:OnLoadRequest",
                 "GeckoView:OnNewSession"
             }
         ) {
             // This needs to match nsIBrowserDOMWindow.idl
             private int convertGeckoTarget(int geckoTarget) {
                 switch (geckoTarget) {
                     case 0: // OPEN_DEFAULTWINDOW
                     case 1: // OPEN_CURRENTWINDOW
@@ -145,17 +145,17 @@ public class GeckoSession extends LayerS
                                       final EventCallback callback) {
                 if ("GeckoView:LocationChange".equals(event)) {
                     delegate.onLocationChange(GeckoSession.this,
                                               message.getString("uri"));
                     delegate.onCanGoBack(GeckoSession.this,
                                          message.getBoolean("canGoBack"));
                     delegate.onCanGoForward(GeckoSession.this,
                                             message.getBoolean("canGoForward"));
-                } else if ("GeckoView:OnLoadUri".equals(event)) {
+                } else if ("GeckoView:OnLoadRequest".equals(event)) {
                     final String uri = message.getString("uri");
                     final int where = convertGeckoTarget(message.getInt("where"));
                     final boolean result =
                         delegate.onLoadRequest(GeckoSession.this, uri, where);
                     callback.sendSuccess(result);
                 } else if ("GeckoView:OnNewSession".equals(event)) {
                     final String uri = message.getString("uri");
                     delegate.onNewSession(GeckoSession.this, uri,
--- a/mobile/android/modules/geckoview/LoadURIDelegate.jsm
+++ b/mobile/android/modules/geckoview/LoadURIDelegate.jsm
@@ -18,17 +18,17 @@ var LoadURIDelegate = {
   // Return whether the loading has been handled.
   load: function(aEventDispatcher, aUri, aWhere, aFlags, aTriggeringPrincipal) {
     // TODO: Remove this when we have a sensible error API.
     if (aUri && aUri.displaySpec.startsWith("about:certerror")) {
       addEventListener("click", ErrorPageEventHandler, true);
     }
 
     const message = {
-      type: "GeckoView:OnLoadUri",
+      type: "GeckoView:OnLoadRequest",
       uri: aUri ? aUri.displaySpec : "",
       where: aWhere,
       flags: aFlags
     };
 
     let handled = undefined;
     aEventDispatcher.sendRequestForResult(message).then(response => {
       handled = response;