Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(697)

Unified Diff: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java

Issue 1986783002: Text selected with double-tap should not cause vibration (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: added description of return value of showContextMenu Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 e9af227ec12f4dd52f640f0b56a47cf1692a2d16..5682db392451fccc9c4999cc6ee440ea798a1d3a 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
@@ -2311,9 +2311,6 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Screen
mSelectionRect.set(left, top, right, bottom);
mHasSelection = true;
mUnselectAllOnActionModeDismiss = true;
- // TODO(cjhopman): Remove this when there is a better signal that long press caused
- // a selection. See http://crbug.com/150151.
- mContainerView.performHapticFeedback(HapticFeedbackConstants.LONG_PRESS);
showSelectActionMode(true);
break;
@@ -2659,10 +2656,7 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Screen
@SuppressWarnings("unused")
@CalledByNative
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 {
@@ -2670,6 +2664,12 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Screen
}
}
+ @SuppressWarnings("unused")
+ @CalledByNative
+ private void performLongPressHapticFeedback() {
+ mContainerView.performHapticFeedback(HapticFeedbackConstants.LONG_PRESS);
+ }
+
@VisibleForTesting
public boolean isPastePopupShowing() {
if (mPastePopupMenu != null) return mPastePopupMenu.isShowing();
« no previous file with comments | « content/browser/android/content_view_core_impl.cc ('k') | third_party/WebKit/Source/core/loader/EmptyClients.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698