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 de62b51d0efcdc9cc837c42d7f750371246342eb..db3534988707b7ef57a02abee449fcd98769b357 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 |
@@ -2561,11 +2561,15 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Screen |
@SuppressWarnings("unused") |
@CalledByNative |
- private void showPastePopupWithFeedback(int x, int y) { |
+ private boolean showPastePopupWithFeedback(int x, int y) { |
// TODO(jdduke): Remove this when there is a better signal that long press caused |
// showing of the paste popup. See http://crbug.com/150151. |
if (showPastePopup(x, y)) { |
mContainerView.performHapticFeedback(HapticFeedbackConstants.LONG_PRESS); |
+ if (mWebContents != null) mWebContents.onContextMenuOpened(); |
+ return true; |
+ } else { |
+ return false; |
} |
} |
@@ -2594,6 +2598,11 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Screen |
mWebContents.paste(); |
dismissTextHandles(); |
} |
+ |
+ @Override |
+ public void onDismiss() { |
+ if (mWebContents != null) mWebContents.onContextMenuClosed(); |
+ } |
}; |
if (supportsFloatingActionMode()) { |
mPastePopupMenu = new FloatingPastePopupMenu(getContainerView(), delegate); |