Bug 1534802 - Remove unused GeckoView delegate overrides in Fennec r=petru
authorJames Willcox <snorp@snorp.net>
Tue, 16 Apr 2019 22:37:47 +0000
changeset 469804 486ef552fa32a8b2e2e696d169ef59189f85bc1e
parent 469803 37185c0ae5200e69a791a3f063c4708ce1cad042
child 469805 70a566b541e084238195ec57a504154812b9ba6b
push id35883
push userbtara@mozilla.com
push dateWed, 17 Apr 2019 21:47:29 +0000
treeherdermozilla-central@02b89c29412b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspetru
bugs1534802
milestone68.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 1534802 - Remove unused GeckoView delegate overrides in Fennec r=petru Differential Revision: https://phabricator.services.mozilla.com/D23226
mobile/android/base/java/org/mozilla/gecko/GeckoApp.java
mobile/android/base/java/org/mozilla/gecko/customtabs/CustomTabsActivity.java
mobile/android/base/java/org/mozilla/gecko/webapps/WebAppActivity.java
--- a/mobile/android/base/java/org/mozilla/gecko/GeckoApp.java
+++ b/mobile/android/base/java/org/mozilla/gecko/GeckoApp.java
@@ -906,58 +906,26 @@ public abstract class GeckoApp extends G
             } else {
                 inSampleSize = Math.round((float)width / idealWidth);
             }
         }
         return inSampleSize;
     }
 
     @Override // GeckoSession.ContentDelegate
-    public void onTitleChange(final GeckoSession session, final String title) {
-    }
-
-    @Override // GeckoSession.ContentDelegate
-    public void onFocusRequest(final GeckoSession session) {
-    }
-
-    @Override // GeckoSession.ContentDelegate
-    public void onCloseRequest(final GeckoSession session) {
-    }
-
-    @Override // GeckoSession.ContentDelegate
     public void onFullScreen(final GeckoSession session, final boolean fullScreen) {
         if (fullScreen) {
             SnackbarBuilder.builder(this)
                     .message(R.string.fullscreen_warning)
                     .duration(Snackbar.LENGTH_LONG).buildAndShow();
         }
         ThreadUtils.assertOnUiThread();
         ActivityUtils.setFullScreen(this, fullScreen);
     }
 
-    @Override
-    public void onContextMenu(final GeckoSession session,
-                              final int screenX, final int screenY,
-                              final GeckoSession.ContentDelegate.ContextElement element) {
-    }
-
-    @Override
-    public void onExternalResponse(final GeckoSession session, final GeckoSession.WebResponseInfo request) {
-        // Won't happen, as we don't use the GeckoView download support in Fennec
-    }
-
-    @Override
-    public void onCrash(final GeckoSession session) {
-        // Won't happen, as we don't use e10s in Fennec
-    }
-
-    @Override
-    public void onFirstComposite(final GeckoSession session) {
-    }
-
     protected void setFullScreen(final boolean fullscreen) {
         ThreadUtils.postToUiThread(new Runnable() {
             @Override
             public void run() {
                 onFullScreen(mLayerView.getSession(), fullscreen);
             }
         });
     }
--- a/mobile/android/base/java/org/mozilla/gecko/customtabs/CustomTabsActivity.java
+++ b/mobile/android/base/java/org/mozilla/gecko/customtabs/CustomTabsActivity.java
@@ -628,22 +628,16 @@ public class CustomTabsActivity extends 
     }
 
     @Override
     public GeckoResult<GeckoSession> onNewSession(final GeckoSession session, final String uri) {
         // We should never get here because we abort loads that need a new session in onLoadRequest()
         throw new IllegalStateException("Unexpected new session");
     }
 
-    @Override
-    public GeckoResult<String> onLoadError(final GeckoSession session, final String urlStr,
-                                           final WebRequestError error) {
-        return null;
-    }
-
     /* GeckoSession.ProgressDelegate */
     @Override
     public void onPageStart(GeckoSession session, String url) {
         mCurrentUrl = url;
         mCanStop = true;
         updateActionBar();
         updateCanStop();
     }
@@ -679,21 +673,16 @@ public class CustomTabsActivity extends 
     @Override
     public void onFocusRequest(GeckoSession session) {
         Intent intent = new Intent(getIntent());
         intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
         startActivity(intent);
     }
 
     @Override
-    public void onCloseRequest(GeckoSession session) {
-        // Ignore
-    }
-
-    @Override
     public void onFullScreen(GeckoSession session, boolean fullScreen) {
         ActivityUtils.setFullScreen(this, fullScreen);
         if (fullScreen) {
             getSupportActionBar().hide();
         } else {
             getSupportActionBar().show();
         }
     }
@@ -713,30 +702,16 @@ public class CustomTabsActivity extends 
         runOnUiThread(new Runnable() {
             @Override
             public void run() {
                 WebApps.openInFennec(validUri, CustomTabsActivity.this);
             }
         });
     }
 
-    @Override
-    public void onExternalResponse(final GeckoSession session, final GeckoSession.WebResponseInfo request) {
-        // Won't happen, as we don't use the GeckoView download support in Fennec
-    }
-
-    @Override
-    public void onCrash(final GeckoSession session) {
-        // Won't happen, as we don't use e10s in Fennec
-    }
-
-    @Override
-    public void onFirstComposite(final GeckoSession session) {
-    }
-
     @Override // ActionModePresenter
     public void startActionMode(final ActionMode.Callback callback) {
         endActionMode();
         mActionMode = startSupportActionMode(callback);
     }
 
     @Override // ActionModePresenter
     public void endActionMode() {
--- a/mobile/android/base/java/org/mozilla/gecko/webapps/WebAppActivity.java
+++ b/mobile/android/base/java/org/mozilla/gecko/webapps/WebAppActivity.java
@@ -322,74 +322,43 @@ public class WebAppActivity extends AppC
                 mode = GeckoSessionSettings.DISPLAY_MODE_BROWSER;
                 break;
         }
 
         mGeckoSession.getSettings().setDisplayMode(mode);
     }
 
     @Override // GeckoSession.NavigationDelegate
-    public void onLocationChange(GeckoSession session, String url) {
-    }
-
-    @Override // GeckoSession.NavigationDelegate
     public void onCanGoBack(GeckoSession session, boolean canGoBack) {
         mCanGoBack = canGoBack;
     }
 
-    @Override // GeckoSession.NavigationDelegate
-    public void onCanGoForward(GeckoSession session, boolean canGoForward) {
-    }
-
-    @Override // GeckoSession.ContentDelegate
-    public void onTitleChange(GeckoSession session, String title) {
-    }
-
     @Override // GeckoSession.ContentDelegate
     public void onFocusRequest(GeckoSession session) {
         Intent intent = new Intent(getIntent());
         intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
         startActivity(intent);
     }
 
     @Override // GeckoSession.ContentDelegate
-    public void onCloseRequest(GeckoSession session) {
-        // Ignore
-    }
-
-    @Override // GeckoSession.ContentDelegate
     public void onContextMenu(final GeckoSession session,
                               int screenX, int screenY,
                               final ContextElement element) {
         final String content = element.linkUri != null
                                ? element.linkUri
                                : element.srcUri != null ? element.srcUri : "";
         final Uri validUri = WebApps.getValidURL(content);
         if (validUri == null) {
             return;
         }
 
         WebApps.openInFennec(validUri, WebAppActivity.this);
     }
 
     @Override // GeckoSession.ContentDelegate
-    public void onExternalResponse(final GeckoSession session, final GeckoSession.WebResponseInfo request) {
-        // Won't happen, as we don't use the GeckoView download support in Fennec
-    }
-
-    @Override // GeckoSession.ContentDelegate
-    public void onCrash(final GeckoSession session) {
-        // Won't happen, as we don't use e10s in Fennec
-    }
-
-    @Override
-    public void onFirstComposite(final GeckoSession session) {
-    }
-
-    @Override // GeckoSession.ContentDelegate
     public void onFullScreen(GeckoSession session, boolean fullScreen) {
         updateFullScreenContent(fullScreen);
     }
 
     @Override
     public GeckoResult<AllowOrDeny> onLoadRequest(final GeckoSession session,
                                                   final LoadRequest request) {
         final Uri uri = Uri.parse(request.uri);