Bug 1489933 - Make GeckoDisplay and PanZoomController constructors protected r=snorp
authorPaul Roget <paul@mozilla.com>
Tue, 02 Oct 2018 10:22:26 -0500
changeset 494996 66fcf985374fbc49cbf5a27f850193ce4c18989a
parent 494995 686469f2aff820259a3cca47cfb3249ae7ceba16
child 494997 04cf22628ca53643fdb9620fe547ae59f45e4b14
push id9984
push userffxbld-merge
push dateMon, 15 Oct 2018 21:07:35 +0000
treeherdermozilla-beta@183d27ea8570 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssnorp
bugs1489933
milestone64.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 1489933 - Make GeckoDisplay and PanZoomController constructors protected r=snorp
mobile/android/geckoview/src/main/java/org/mozilla/gecko/gfx/PanZoomController.java
mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoDisplay.java
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/gfx/PanZoomController.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/gfx/PanZoomController.java
@@ -13,17 +13,17 @@ import android.graphics.Rect;
 import android.os.SystemClock;
 import android.util.Log;
 import android.util.Pair;
 import android.view.MotionEvent;
 import android.view.InputDevice;
 
 import java.util.ArrayList;
 
-public final class PanZoomController extends JNIObject {
+public class PanZoomController extends JNIObject {
     private static final String LOGTAG = "GeckoNPZC";
     private static final int EVENT_SOURCE_SCROLL = 0;
     private static final int EVENT_SOURCE_MOTION = 1;
     private static final int EVENT_SOURCE_MOUSE = 2;
 
     private final LayerSession mSession;
     private final Rect mTempRect = new Rect();
     private boolean mAttached;
@@ -144,17 +144,17 @@ public final class PanZoomController ext
         mSession.getSurfaceBounds(mTempRect);
         final float x = coords.x - mTempRect.left;
         final float y = coords.y - mTempRect.top;
 
         return handleMouseEvent(event.getActionMasked(), event.getEventTime(),
                                 event.getMetaState(), x, y, event.getButtonState());
     }
 
-    /* package */ PanZoomController(final LayerSession session) {
+    protected PanZoomController(final LayerSession session) {
         mSession = session;
         enableEventQueue();
     }
 
     /**
      * Set the current scroll factor. The scroll factor is the maximum scroll amount that
      * one scroll event may generate, in device pixels.
      *
--- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoDisplay.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoDisplay.java
@@ -12,17 +12,17 @@ import android.view.Surface;
  * Applications use a GeckoDisplay instance to provide {@link GeckoSession} with a {@link Surface} for
  * displaying content. To ensure drawing only happens on a valid {@link Surface}, {@link GeckoSession}
  * will only use the provided {@link Surface} after {@link #surfaceChanged(Surface, int, int)} is
  * called and before {@link #surfaceDestroyed()} returns.
  */
 public class GeckoDisplay {
     private final GeckoSession session;
 
-    /* package */ GeckoDisplay(final GeckoSession session) {
+    protected GeckoDisplay(final GeckoSession session) {
         this.session = session;
     }
 
     /**
      * Required callback. The display's Surface has been created or changed. Must be
      * called on the application main thread. GeckoSession may block this call to ensure
      * the Surface is valid while resuming drawing.
      *