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

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

Issue 2863573004: Explicitly tell Smart Select whether or not to suggest (Closed)
Patch Set: Make cancel requests explicit Created 3 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/SelectionPopupController.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/SelectionPopupController.java b/content/public/android/java/src/org/chromium/content/browser/SelectionPopupController.java
index 6493e4abb98f9cef067f2f883888a7c320db3d72..3067b1131e5ca7f979d0a186050f300ecbb2e7fa 100644
--- a/content/public/android/java/src/org/chromium/content/browser/SelectionPopupController.java
+++ b/content/public/android/java/src/org/chromium/content/browser/SelectionPopupController.java
@@ -927,7 +927,8 @@ public class SelectionPopupController extends ActionModeCallbackHelper {
mSelectionRect.set(left, top, right, bottom);
mHasSelection = true;
mUnselectAllOnDismiss = true;
- if (mSelectionClient == null || !mSelectionClient.sendsSelectionPopupUpdates()) {
+ if (mSelectionClient == null
Tima Vaisburd 2017/05/05 01:57:06 Nice, I think another option to think of would be
boliu 2017/05/05 02:11:50 true /* suggest */ is good enough for me. I mean d
Tima Vaisburd 2017/05/05 16:54:41 It is absolutely unrelated to this particular CL b
amaralp 2017/05/05 21:18:31 Do you know if Android has already implemented the
+ || !mSelectionClient.requestSelectionPopupUpdates(true)) {
showActionModeOrClearOnFailure();
} else {
// Rely on |mSelectionClient| sending a classification request and the request
@@ -949,6 +950,7 @@ public class SelectionPopupController extends ActionModeCallbackHelper {
mHasSelection = false;
mUnselectAllOnDismiss = false;
mSelectionRect.setEmpty();
+ if (mSelectionClient != null) mSelectionClient.cancelAllRequests();
finishActionMode();
break;
@@ -957,7 +959,8 @@ public class SelectionPopupController extends ActionModeCallbackHelper {
break;
case SelectionEventType.SELECTION_HANDLE_DRAG_STOPPED:
- if (mSelectionClient == null || !mSelectionClient.sendsSelectionPopupUpdates()) {
+ if (mSelectionClient == null
+ || !mSelectionClient.requestSelectionPopupUpdates(false)) {
hideActionMode(false);
}
// Otherwise rely on |mSelectionClient| sending a classification request and the

Powered by Google App Engine
This is Rietveld 408576698