Index: content/public/android/java/src/org/chromium/content/browser/SelectActionModeCallback.java |
diff --git a/content/public/android/java/src/org/chromium/content/browser/SelectActionModeCallback.java b/content/public/android/java/src/org/chromium/content/browser/SelectActionModeCallback.java |
index 6053448f554ae42d31589d8de0d570f0b82e01bd..24d953f544265fa99efb8c6c6c0b58b28f416653 100644 |
--- a/content/public/android/java/src/org/chromium/content/browser/SelectActionModeCallback.java |
+++ b/content/public/android/java/src/org/chromium/content/browser/SelectActionModeCallback.java |
@@ -76,6 +76,12 @@ public class SelectActionModeCallback implements ActionMode.Callback { |
boolean paste(); |
/** |
+ * Perform a search action. |
+ * @return true iff the action was successful. |
+ */ |
+ boolean search(); |
Ted C
2013/09/10 16:05:06
so this one is behaviorally different from the res
David Trainor- moved to gerrit
2013/09/10 22:35:46
I updated this to work as you'd expect. I removed
|
+ |
+ /** |
* @return true iff the current selection is editable (e.g. text within an input field). |
*/ |
boolean isSelectionEditable(); |
@@ -213,7 +219,7 @@ public class SelectActionModeCallback implements ActionMode.Callback { |
mode.finish(); |
break; |
case ID_SEARCH: |
- if (!TextUtils.isEmpty(selection)) { |
+ if (!TextUtils.isEmpty(selection) && !mActionHandler.search()) { |
Intent i = new Intent(Intent.ACTION_WEB_SEARCH); |
i.putExtra(SearchManager.EXTRA_NEW_SEARCH, true); |
i.putExtra(SearchManager.QUERY, selection); |