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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchSelectionController.java

Issue 2201853002: Blink handle selection handle visibility (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: layout test doesnt make sense because tap causes selections handles to be shown Created 4 years, 2 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: chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchSelectionController.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchSelectionController.java b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchSelectionController.java
index 3a3630cd1a4f1a7eaba0adcdffa1033996b49b39..2c786cf8943c98cfb9be069a55ff358a86c66afa 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchSelectionController.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchSelectionController.java
@@ -69,7 +69,6 @@ public class ContextualSearchSelectionController {
private ContextualSearchTapState mLastTapState;
private TapSuppressionHeuristics mTapHeuristics;
private boolean mIsWaitingForInvalidTapDetection;
- private boolean mIsSelectionEstablished;
private boolean mShouldHandleSelectionModification;
private boolean mDidExpandSelection;
@@ -296,12 +295,6 @@ public class ContextualSearchSelectionController {
case SelectionEventType.SELECTION_HANDLE_DRAG_STOPPED:
shouldHandleSelection = mShouldHandleSelectionModification;
break;
- case SelectionEventType.SELECTION_ESTABLISHED:
- mIsSelectionEstablished = true;
- break;
- case SelectionEventType.SELECTION_DISSOLVED:
- mIsSelectionEstablished = false;
- break;
default:
}
@@ -513,11 +506,11 @@ public class ContextualSearchSelectionController {
}
/**
- * @return whether the selection has been established, for testing.
+ * @return whether selection is empty, for testing.
*/
@VisibleForTesting
- boolean isSelectionEstablished() {
- return mIsSelectionEstablished;
+ boolean isSelectionEmpty() {
+ return "".equals(mSelectedText);
Donn Denman 2016/10/14 01:05:43 Since mSelectedText can be null, it's safer to use
}
/**

Powered by Google App Engine
This is Rietveld 408576698