| Index: content/public/android/java/src/org/chromium/content/browser/input/PopupTouchHandleDrawable.java
|
| diff --git a/content/public/android/java/src/org/chromium/content/browser/input/PopupTouchHandleDrawable.java b/content/public/android/java/src/org/chromium/content/browser/input/PopupTouchHandleDrawable.java
|
| index dce0644ca968d5776a59fb724a9aae67b72a5d2a..7b514eccc1c80297c18b62de95b78058bdd6b2f0 100644
|
| --- a/content/public/android/java/src/org/chromium/content/browser/input/PopupTouchHandleDrawable.java
|
| +++ b/content/public/android/java/src/org/chromium/content/browser/input/PopupTouchHandleDrawable.java
|
| @@ -19,7 +19,6 @@ import android.widget.PopupWindow;
|
|
|
| import org.chromium.base.annotations.CalledByNative;
|
| import org.chromium.base.annotations.JNINamespace;
|
| -import org.chromium.content.browser.ContainerViewObserver;
|
| import org.chromium.content.browser.ContentViewCore;
|
| import org.chromium.content.browser.PositionObserver;
|
| import org.chromium.content.browser.ViewPositionObserver;
|
| @@ -40,7 +39,6 @@ import java.lang.reflect.Method;
|
| public class PopupTouchHandleDrawable extends View {
|
| private final PopupWindow mContainer;
|
| private final PositionObserver.Listener mParentPositionListener;
|
| - private final ContainerViewObserver mParentViewObserver;
|
| private ContentViewCore mContentViewCore;
|
| private PositionObserver mParentPositionObserver;
|
| private Drawable mDrawable;
|
| @@ -122,18 +120,6 @@ public class PopupTouchHandleDrawable extends View {
|
| updateParentPosition(x, y);
|
| }
|
| };
|
| - mParentViewObserver = new ContainerViewObserver() {
|
| - @Override
|
| - public void onContainerViewChanged(ViewGroup newContainerView) {
|
| - // If the parent View ever changes, the parent position observer
|
| - // must be updated accordingly.
|
| - mParentPositionObserver.clearListener();
|
| - mParentPositionObserver = new ViewPositionObserver(newContainerView);
|
| - if (mContainer.isShowing()) {
|
| - mParentPositionObserver.addListener(mParentPositionListener);
|
| - }
|
| - }
|
| - };
|
| mGestureStateListener = new GestureStateListener() {
|
| @Override
|
| public void onScrollStarted(int scrollOffsetX, int scrollOffsetY) {
|
| @@ -165,7 +151,6 @@ public class PopupTouchHandleDrawable extends View {
|
| }
|
| };
|
| mContentViewCore.addGestureStateListener(mGestureStateListener);
|
| - mContentViewCore.addContainerViewObserver(mParentViewObserver);
|
| }
|
|
|
| private static void setWindowLayoutType(PopupWindow window, int layoutType) {
|
| @@ -436,7 +421,6 @@ public class PopupTouchHandleDrawable extends View {
|
| if (mContentViewCore == null) return;
|
| hide();
|
| mContentViewCore.removeGestureStateListener(mGestureStateListener);
|
| - mContentViewCore.removeContainerViewObserver(mParentViewObserver);
|
| mContentViewCore = null;
|
| }
|
|
|
| @@ -515,4 +499,14 @@ public class PopupTouchHandleDrawable extends View {
|
| if (mDrawable == null) return 0;
|
| return mDrawable.getIntrinsicHeight();
|
| }
|
| +
|
| + public void onContainerViewChanged(ViewGroup newContainerView) {
|
| + // If the parent View ever changes, the parent position observer
|
| + // must be updated accordingly.
|
| + mParentPositionObserver.clearListener();
|
| + mParentPositionObserver = new ViewPositionObserver(newContainerView);
|
| + if (mContainer.isShowing()) {
|
| + mParentPositionObserver.addListener(mParentPositionListener);
|
| + }
|
| + }
|
| }
|
|
|