Chromium Code Reviews| 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 1c480c3c80699445ace2f8d3dd82c41bc2e560f0..396e90734154bd196bbd24d995f76b11f6021f38 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 |
| @@ -2485,17 +2485,6 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Screen |
| @SuppressWarnings("unused") |
| @CalledByNative |
| - private boolean showPastePopupWithFeedback(int x, int y) { |
| - if (showPastePopup(x, y)) { |
| - if (mWebContents != null) mWebContents.onContextMenuOpened(); |
| - return true; |
| - } else { |
| - return false; |
| - } |
| - } |
| - |
| - @SuppressWarnings("unused") |
| - @CalledByNative |
| private void performLongPressHapticFeedback() { |
| mContainerView.performHapticFeedback(HapticFeedbackConstants.LONG_PRESS); |
| } |
| @@ -2506,16 +2495,17 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Screen |
| return false; |
| } |
| + @CalledByNative |
|
Ted C
2016/09/22 21:46:39
annotations should go right above the method decla
amaralp
2016/09/22 22:03:29
Done.
|
| // Coordinates are in DIP. |
| - private boolean showPastePopup(int x, int y) { |
| + private void showPastePopup(int x, int y) { |
| if (mContainerView.getParent() == null || mContainerView.getVisibility() != View.VISIBLE) { |
| - return false; |
| + return; |
| } |
| - if (!mHasInsertion || !canPaste()) return false; |
| + if (!mHasInsertion || !canPaste()) return; |
| PastePopupMenu pastePopupMenu = getPastePopup(); |
| - if (pastePopupMenu == null) return false; |
| + if (pastePopupMenu == null) return; |
| final float deviceScale = mRenderCoordinates.getDeviceScaleFactor(); |
| final int xPix = (int) (x * deviceScale); |
| @@ -2524,9 +2514,7 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Screen |
| try { |
| pastePopupMenu.show(xPix, (int) (yPix + topControlsShownPix)); |
| } catch (WindowManager.BadTokenException e) { |
| - return false; |
| } |
| - return true; |
| } |
| private void hidePastePopup() { |
| @@ -2541,11 +2529,6 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Screen |
| mWebContents.paste(); |
| dismissTextHandles(); |
| } |
| - |
| - @Override |
| - public void onDismiss() { |
| - if (mWebContents != null) mWebContents.onContextMenuClosed(); |
| - } |
| }; |
| Context windowContext = getWindowAndroid().getContext().get(); |
| if (windowContext == null) return null; |