Index: content/public/android/java/src/org/chromium/content/browser/ContextSelectionClient.java |
diff --git a/content/public/android/java/src/org/chromium/content/browser/ContextSelectionClient.java b/content/public/android/java/src/org/chromium/content/browser/ContextSelectionClient.java |
index 6a8bcea1be127d6450024cd13c9400a3b5a49a39..0edd3f5938fa1774bb327b06085d747954b786c1 100644 |
--- a/content/public/android/java/src/org/chromium/content/browser/ContextSelectionClient.java |
+++ b/content/public/android/java/src/org/chromium/content/browser/ContextSelectionClient.java |
@@ -79,24 +79,11 @@ public class ContextSelectionClient implements SelectionClient { |
@Override |
public void onSelectionEvent(int eventType, float posXPix, float posYPix) { |
switch (eventType) { |
- case SelectionEventType.SELECTION_HANDLES_SHOWN: |
- // This event is sent when the long press is detected which causes |
- // selection to appear for the first time. Temporarily hiding the |
- // handles that happens e.g. during scroll does not affect this event. |
- requestSurroundingText(SUGGEST_AND_CLASSIFY); |
- break; |
- |
case SelectionEventType.SELECTION_HANDLES_CLEARED: |
// The ActionMode should be stopped when this event comes. |
cancelAllRequests(); |
break; |
- case SelectionEventType.SELECTION_HANDLE_DRAG_STOPPED: |
- // This event is sent after a user stopped dragging one of the |
- // selection handles, i.e. stopped modifying the selection. |
- requestSurroundingText(CLASSIFY); |
- break; |
- |
default: |
break; // ignore |
} |
@@ -106,7 +93,8 @@ public class ContextSelectionClient implements SelectionClient { |
public void showUnhandledTapUIIfNeeded(int x, int y) {} |
@Override |
- public boolean sendsSelectionPopupUpdates() { |
+ public boolean sendsSelectionPopupUpdates(boolean shouldSuggest) { |
+ requestSurroundingText(shouldSuggest ? SUGGEST_AND_CLASSIFY : CLASSIFY); |
boliu
2017/04/21 21:20:18
this method right now is "does this client send se
|
return true; |
} |