| Index: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
| diff --git a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
| index b5c2144af693d81a646d761a33aecd3982a422b3..8f77b85fb55e59e1ff241a8dc223d9091f64d5c7 100644
|
| --- a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
| +++ b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
| @@ -425,6 +425,9 @@ public class ContentViewCore
|
| // Cached copy of all positions and scales as reported by the renderer.
|
| private final RenderCoordinates mRenderCoordinates;
|
|
|
| + // Buffer to receive return value from View#getLocationOnScreen(int[]).
|
| + private final int[] mGetLocationOnScreenBuffer = new int[2];
|
| +
|
| // Tracks whether a selection is currently active. When applied to selected text, indicates
|
| // whether the last selected text is still highlighted.
|
| private boolean mHasSelection;
|
| @@ -3039,6 +3042,13 @@ public class ContentViewCore
|
| return mFullscreenRequiredForOrientationLock;
|
| }
|
|
|
| + @CalledByNative
|
| + private long getLocationOnScreen() {
|
| + // TODO(yukawa): ViewPositionObserver has similar logic. Try to merge them.
|
| + mContainerView.getLocationInWindow(mGetLocationOnScreenBuffer);
|
| + return ((long) mGetLocationOnScreenBuffer[0]) << 32 | mGetLocationOnScreenBuffer[1];
|
| + }
|
| +
|
| private native WebContents nativeGetWebContentsAndroid(long nativeContentViewCoreImpl);
|
|
|
| private native void nativeOnJavaContentViewCoreDestroyed(long nativeContentViewCoreImpl);
|
|
|