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

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

Issue 2957213002: [TTS] Fix assert after TTS and Context Menu. (Closed)
Patch Set: Removed the check for null before trim() -- it's redundant. Created 3 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 edae5444f0abbf27738f4d62fb3aa5a66e8e7680..b241bae4005bba0ac12529c6398624bbd2224e7b 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
@@ -70,10 +70,6 @@ public class ContextualSearchSelectionController {
// When the last tap gesture happened.
private long mTapTimeNanoseconds;
- // Tracks whether a Context Menu has just been shown and the UX has been dismissed.
- // The selection may be unreliable until the next reset. See crbug.com/628436.
- private boolean mIsContextMenuShown;
-
private class ContextualSearchGestureStateListener extends GestureStateListener {
@Override
public void onScrollStarted(int scrollOffsetY, int scrollExtentY) {
@@ -125,12 +121,10 @@ public class ContextualSearchSelectionController {
/**
* Notifies that a Context Menu has been shown.
- * Future controller events may be unreliable until the next reset.
*/
void onContextMenuShown() {
// Hide the UX.
mHandler.handleSelectionDismissal();
- mIsContextMenuShown = true;
}
/**
@@ -252,11 +246,9 @@ public class ContextualSearchSelectionController {
boolean shouldHandleSelection = false;
switch (eventType) {
case SelectionEventType.SELECTION_HANDLES_SHOWN:
- if (!mIsContextMenuShown) {
- mWasTapGestureDetected = false;
- mSelectionType = SelectionType.LONG_PRESS;
- shouldHandleSelection = true;
- }
+ mWasTapGestureDetected = false;
+ mSelectionType = SelectionType.LONG_PRESS;
+ shouldHandleSelection = true;
break;
case SelectionEventType.SELECTION_HANDLES_CLEARED:
mHandler.handleSelectionDismissal();
@@ -301,7 +293,6 @@ public class ContextualSearchSelectionController {
resetSelectionStates();
mLastTapState = null;
mLastScrollTimeNs = 0;
- mIsContextMenuShown = false;
mTapTimeNanoseconds = 0;
mDidExpandSelection = false;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698