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

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

Issue 2703643004: [TTS] Add an ACK message to SelectWordAroundCaret. (Closed)
Patch Set: Just fixed a typo in a comment. Created 3 years, 10 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 c16b63a10a95e081fa8507759db6b768d765fb23..2cd3e65bbab65828b747a0dd52a23f127e1a1bd0 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
@@ -430,6 +430,19 @@ public class ContextualSearchSelectionController {
}
}
+ /**
+ * Acknowledges that a selectWordAroundCaret action has completed with the give result.
+ * @param didSelect Whether a word was actually selected or not.
+ * @param startAdjust The adjustment to the selection start offset needed to select the word.
+ * This is typically a negative number (expressed in terms of number of characters).
+ * @param endAdjust The adjustment to the selection end offset needed to select the word.
+ * This is typically a positive number (expressed in terms of number of characters).
+ */
+ void selectWordAroundCaretAck(boolean didSelect, int startAdjust, int endAdjust) {
+ // TODO(donnd): use startAdjust and endAdjust in upcoming text-extraction CL (started).
aelias_OOO_until_Jul13 2017/02/22 03:36:00 You're planning to use these offsets to issue anot
Donn Denman 2017/02/22 23:13:01 Actually we plan to just use these to convert some
+ if (!didSelect) mHandler.handleInvalidTap();
aelias_OOO_until_Jul13 2017/02/22 03:36:00 This seems a bit upside down. How about doing not
Donn Denman 2017/02/22 23:13:01 I think this will look much better once the depend
+ }
+
// ============================================================================================
// Invalid Tap Notification
// ============================================================================================

Powered by Google App Engine
This is Rietveld 408576698