Bug 1396951 - 6. Remove setLayerView/getLayerView; r=snorp
☠☠ backed out by d464f7719557 ☠ ☠
authorJim Chen <nchen@mozilla.com>
Thu, 21 Sep 2017 17:36:07 -0400
changeset 382304 0a367a71ca4381367346f9d600472d80205e72e3
parent 382303 b5a88815b3a6316615c424a8fbb3e292e159e6a0
child 382305 87f57d513b3723d6ff023d4f6d7319b95e25013a
push id32553
push userphilringnalda@gmail.com
push dateFri, 22 Sep 2017 03:40:16 +0000
treeherdermozilla-central@97282b0c985a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssnorp
bugs1396951
milestone58.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 1396951 - 6. Remove setLayerView/getLayerView; r=snorp Remove `GeckoAppShell.setLayerView()/getLayerView()` now that it's no longer used anywhere. MozReview-Commit-ID: 6URNFhSs01P
mobile/android/base/java/org/mozilla/gecko/BrowserApp.java
mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoAppShell.java
mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoView.java
--- a/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java
+++ b/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java
@@ -1654,17 +1654,16 @@ public class BrowserApp extends GeckoApp
 
         mDoorHangerPopup.setAnchor(mBrowserToolbar.getDoorHangerAnchor());
         mDoorHangerPopup.setOnVisibilityChangeListener(this);
 
         if (mLayerView != null) {
             mLayerView.getDynamicToolbarAnimator().addMetricsListener(this);
             mLayerView.getDynamicToolbarAnimator().setToolbarChromeProxy(this);
         }
-        mDynamicToolbar.setLayerView(mLayerView);
         setDynamicToolbarEnabled(mDynamicToolbar.isEnabled());
 
         // Intercept key events for gamepad shortcuts
         mLayerView.setOnKeyListener(this);
 
         // Initialize the actionbar menu items on startup for both large and small tablets
         if (HardwareUtils.isTablet()) {
             onCreatePanelMenu(Window.FEATURE_OPTIONS_PANEL, null);
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoAppShell.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoAppShell.java
@@ -23,17 +23,16 @@ import java.util.List;
 import java.util.Map;
 import java.util.StringTokenizer;
 import java.util.TreeMap;
 
 import org.mozilla.gecko.annotation.JNITarget;
 import org.mozilla.gecko.annotation.RobocopTarget;
 import org.mozilla.gecko.annotation.WrapForJNI;
 import org.mozilla.gecko.gfx.BitmapUtils;
-import org.mozilla.gecko.gfx.LayerView;
 import org.mozilla.gecko.permissions.Permissions;
 import org.mozilla.gecko.process.GeckoProcessManager;
 import org.mozilla.gecko.util.HardwareCodecCapabilityUtils;
 import org.mozilla.gecko.util.HardwareUtils;
 import org.mozilla.gecko.util.IOUtils;
 import org.mozilla.gecko.util.ProxySelector;
 import org.mozilla.gecko.util.ThreadUtils;
 
@@ -217,31 +216,18 @@ public class GeckoAppShell
 
     // helper methods
     @WrapForJNI
     /* package */ static native void reportJavaCrash(Throwable exc, String stackTrace);
 
     @WrapForJNI(dispatchTo = "gecko")
     public static native void notifyUriVisited(String uri);
 
-    private static LayerView sLayerView;
     private static Rect sScreenSize;
 
-    public static void setLayerView(LayerView lv) {
-        if (sLayerView == lv) {
-            return;
-        }
-        sLayerView = lv;
-    }
-
-    @RobocopTarget
-    public static LayerView getLayerView() {
-        return sLayerView;
-    }
-
     @WrapForJNI(stubName = "NotifyObservers", dispatchTo = "gecko")
     private static native void nativeNotifyObservers(String topic, String data);
 
     @RobocopTarget
     public static void notifyObservers(final String topic, final String data) {
         notifyObservers(topic, data, GeckoThread.State.RUNNING);
     }
 
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoView.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoView.java
@@ -483,19 +483,16 @@ public class GeckoView extends LayerView
                                         /* debugging */ false)) {
             GeckoThread.launch();
         }
     }
 
     private void init(final Context context, final GeckoViewSettings settings) {
         preload(context);
 
-        // Perform common initialization for Fennec/GeckoView.
-        GeckoAppShell.setLayerView(this);
-
         initializeView();
         mListener.registerListeners();
 
         if (settings == null) {
             mSettings = new GeckoViewSettings(getEventDispatcher());
         } else {
             mSettings = settings;
         }