Index: content/public/android/java/src/org/chromium/content/browser/input/InsertionHandleController.java |
diff --git a/content/public/android/java/src/org/chromium/content/browser/input/InsertionHandleController.java b/content/public/android/java/src/org/chromium/content/browser/input/InsertionHandleController.java |
index f251edf2720fde3fc26ddf8929671440e5cc24d5..39709b16dd3e85b0f2f76cb342d05074d47ec8b4 100644 |
--- a/content/public/android/java/src/org/chromium/content/browser/input/InsertionHandleController.java |
+++ b/content/public/android/java/src/org/chromium/content/browser/input/InsertionHandleController.java |
@@ -18,6 +18,8 @@ import android.widget.PopupWindow; |
import com.google.common.annotations.VisibleForTesting; |
+import org.chromium.content.browser.PositionObserver; |
+ |
/** |
* CursorController for inserting text at the cursor position. |
*/ |
@@ -37,9 +39,13 @@ public abstract class InsertionHandleController implements CursorController { |
private Context mContext; |
- public InsertionHandleController(View parent) { |
+ private PositionObserver mPositionObserver; |
+ |
+ public InsertionHandleController(View parent, PositionObserver positionObserver) { |
mParent = parent; |
+ |
mContext = parent.getContext(); |
+ mPositionObserver = positionObserver; |
} |
/** Allows the handle to be shown automatically when cursor position changes */ |
@@ -167,7 +173,9 @@ public abstract class InsertionHandleController implements CursorController { |
} |
private void createHandleIfNeeded() { |
- if (mHandle == null) mHandle = new HandleView(this, HandleView.CENTER, mParent); |
+ if (mHandle == null) { |
+ mHandle = new HandleView(this, HandleView.CENTER, mParent, mPositionObserver); |
+ } |
} |
private void showHandleIfNeeded() { |