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

Issue 2211353002: [TTS] Gather surrounding text on Tap before any UX. (Closed)

Created:
4 years, 4 months ago by Donn Denman
Modified:
4 years, 3 months ago
CC:
chromium-reviews, twellington+watch_chromium.org, donnd+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[TTS] Gather surrounding text on Tap before any UX. Extract the text tapped on to use as a signal in Tap Suppression. The text is extracted before any UX is displayed in order to allow the tap to be totally ignored when appropriate. Feeding the surrounding text into the logic of TTS will be done separately. This adds several files that are part of the 2016-refactoring. See crbug.com/624609 and go/cs-refactoring-2016. This CL is part of the refactoring-2016 effort, see go/cs-refactoring-2016 for details. BUG=634136, 624609 Committed: https://crrev.com/3f11e42880b1b7b6608e2d57fa538552318367ae Cr-Commit-Position: refs/heads/master@{#418464}

Patch Set 1 #

Patch Set 2 : [TTS] Gather surrounding text on Tap before any UX. #

Patch Set 3 : Split usage of the Tapped text from the SearchAction into a separate CL. #

Total comments: 43

Patch Set 4 : Addressed Theresa's initial comments. #

Patch Set 5 : Changed passing the text sample to java -- now it's by Java request only (currently unused). #

Total comments: 2

Patch Set 6 : Removed java accessors to the tapped text, added simple public native accessors. #

Patch Set 7 : Simplified the results for the native accessors to the context. Removed print statements. #

Total comments: 26

Patch Set 8 : Reworked the native accessors to tapped text and the associated unit tests. Destroying Actions on … #

Total comments: 2

Patch Set 9 : Updated a comment and added a TODO. #

Patch Set 10 : Rebase and cleanup minor build issues. #

Patch Set 11 : Just another rebase. #

Patch Set 12 : Updated instrumentation tests to remove tapBasePageToClosePanel and just call closePanel instead. #

Total comments: 4

Patch Set 13 : Removed unused code and consolidated two functions, updated comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+835 lines, -95 lines) Patch
M chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchSelectionController.java View 1 2 3 4 5 6 7 9 chunks +117 lines, -31 lines 0 comments Download
A chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/action/ResolvedSearchAction.java View 1 2 3 4 5 6 7 1 chunk +52 lines, -0 lines 0 comments Download
A chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/action/SearchAction.java View 1 2 3 4 5 6 7 8 1 chunk +182 lines, -0 lines 0 comments Download
A chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/action/SearchActionListener.java View 1 2 3 4 5 6 1 chunk +36 lines, -0 lines 0 comments Download
A chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/gesture/SearchGestureHost.java View 1 2 3 4 5 6 1 chunk +25 lines, -0 lines 0 comments Download
M chrome/android/java_sources.gni View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManagerTest.java View 1 2 3 4 5 6 7 8 9 10 11 12 18 chunks +22 lines, -59 lines 0 comments Download
M chrome/browser/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +3 lines, -0 lines 0 comments Download
M chrome/browser/android/chrome_jni_registrar.cc View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/browser/android/contextualsearch/contextual_search_context.h View 1 1 chunk +4 lines, -1 line 0 comments Download
M chrome/browser/android/contextualsearch/contextual_search_context.cc View 1 1 chunk +11 lines, -4 lines 0 comments Download
A chrome/browser/android/contextualsearch/search_action.h View 1 2 3 4 5 6 7 1 chunk +84 lines, -0 lines 0 comments Download
A chrome/browser/android/contextualsearch/search_action.cc View 1 2 3 4 5 6 7 8 9 1 chunk +204 lines, -0 lines 0 comments Download
A chrome/browser/android/contextualsearch/search_action_unittest.cc View 1 2 3 4 5 6 7 1 chunk +89 lines, -0 lines 0 comments Download

Messages

Total messages: 45 (18 generated)
Donn Denman
Theresa, This is ready for a first quick-look. Thanks! BTW, I will upload the base ...
4 years, 4 months ago (2016-08-15 23:34:21 UTC) #3
Theresa
A few questions, I'm sure I'll have more. Overall, looks like a big step toward ...
4 years, 4 months ago (2016-08-16 15:41:49 UTC) #4
Theresa
A bigger qusetion I have is how this fits in with the planned C++ signal ...
4 years, 4 months ago (2016-08-16 16:09:47 UTC) #5
Donn Denman
Pedro, adding you as a reviewer, feel free to review as much or little as ...
4 years, 4 months ago (2016-08-17 04:35:22 UTC) #7
Donn Denman
On 2016/08/16 16:09:47, Theresa Wellington wrote: > A bigger qusetion I have is how this ...
4 years, 4 months ago (2016-08-17 20:58:03 UTC) #8
Theresa
On 2016/08/17 20:58:03, Donn Denman wrote: .... > I think gathering various signals is somewhat ...
4 years, 4 months ago (2016-08-18 18:29:32 UTC) #9
Donn Denman
On 2016/08/18 18:29:32, Theresa Wellington wrote: > On 2016/08/17 20:58:03, Donn Denman wrote: > .... ...
4 years, 4 months ago (2016-08-20 00:10:17 UTC) #10
pedro (no code reviews)
https://codereview.chromium.org/2211353002/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchSelectionController.java File chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchSelectionController.java (right): https://codereview.chromium.org/2211353002/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchSelectionController.java#newcode30 chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchSelectionController.java:30: public class ContextualSearchSelectionController implements SearchGestureHost { On 2016/08/17 04:35:21, ...
4 years, 4 months ago (2016-08-22 20:54:18 UTC) #11
Donn Denman
Theresa and Pedro, PTAL at your leisure. I plan to land this after the cut ...
4 years, 4 months ago (2016-08-23 23:21:46 UTC) #12
Theresa
I think long-term we want to always keep the surrounding text in native (right? Or ...
4 years, 3 months ago (2016-08-26 16:39:07 UTC) #13
Donn Denman
Theresa, thanks for the review! Updated by removing the Java accessors to the tapped text ...
4 years, 3 months ago (2016-08-26 19:25:02 UTC) #14
Donn Denman
Theresa and Pedro, I think this is ready for another serious look. This version gathers ...
4 years, 3 months ago (2016-08-31 21:22:46 UTC) #15
pedro (no code reviews)
lgtm https://codereview.chromium.org/2211353002/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchSelectionController.java File chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchSelectionController.java (right): https://codereview.chromium.org/2211353002/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchSelectionController.java#newcode131 chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchSelectionController.java:131: if (mHasIdentifiedUnhandledTap) createSearchAction(); On 2016/08/23 23:21:46, Donn Denman ...
4 years, 3 months ago (2016-08-31 22:38:22 UTC) #16
Theresa
https://codereview.chromium.org/2211353002/diff/120001/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchSelectionController.java File chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchSelectionController.java (right): https://codereview.chromium.org/2211353002/diff/120001/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchSelectionController.java#newcode409 chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchSelectionController.java:409: * gathering surrounding text if needed, etc). nit: ..., ...
4 years, 3 months ago (2016-09-01 16:49:37 UTC) #17
Donn Denman
Thanks for the reviews! Theresa, PTAL. https://chromiumcodereview.appspot.com/2211353002/diff/120001/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchSelectionController.java File chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchSelectionController.java (right): https://chromiumcodereview.appspot.com/2211353002/diff/120001/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchSelectionController.java#newcode409 chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchSelectionController.java:409: * gathering surrounding ...
4 years, 3 months ago (2016-09-02 16:40:44 UTC) #18
Theresa
lgtm % 1 request for a TODO https://codereview.chromium.org/2211353002/diff/120001/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/action/SearchAction.java File chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/action/SearchAction.java (right): https://codereview.chromium.org/2211353002/diff/120001/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/action/SearchAction.java#newcode109 chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/action/SearchAction.java:109: nativeRequestSurroundingText(mNativePointer, webContents); ...
4 years, 3 months ago (2016-09-02 17:04:07 UTC) #19
Donn Denman
Ted PTAL at chrome_jni_registrar.cc for owners approval. Theresa and Pedro, thanks for the review! https://chromiumcodereview.appspot.com/2211353002/diff/120001/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/action/SearchAction.java ...
4 years, 3 months ago (2016-09-02 20:48:35 UTC) #21
Ted C
On 2016/09/02 20:48:35, Donn Denman wrote: > Ted PTAL at chrome_jni_registrar.cc for owners approval. > ...
4 years, 3 months ago (2016-09-02 21:54:13 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2211353002/200001
4 years, 3 months ago (2016-09-09 02:46:28 UTC) #28
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/138809)
4 years, 3 months ago (2016-09-09 04:21:40 UTC) #30
Donn Denman
Theresa, I had to make some changes to the Instrumentation tests in order to get ...
4 years, 3 months ago (2016-09-12 17:14:58 UTC) #35
Theresa
still lgtm https://chromiumcodereview.appspot.com/2211353002/diff/220001/chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManagerTest.java File chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManagerTest.java (right): https://chromiumcodereview.appspot.com/2211353002/diff/220001/chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManagerTest.java#newcode807 chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManagerTest.java:807: private void tapBasePage(float x, float y) { ...
4 years, 3 months ago (2016-09-12 22:59:19 UTC) #36
Donn Denman
Thanks Theresa! https://chromiumcodereview.appspot.com/2211353002/diff/220001/chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManagerTest.java File chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManagerTest.java (right): https://chromiumcodereview.appspot.com/2211353002/diff/220001/chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManagerTest.java#newcode807 chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManagerTest.java:807: private void tapBasePage(float x, float y) { ...
4 years, 3 months ago (2016-09-14 00:18:23 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2211353002/240001
4 years, 3 months ago (2016-09-14 00:19:05 UTC) #40
commit-bot: I haz the power
Committed patchset #13 (id:240001)
4 years, 3 months ago (2016-09-14 02:55:48 UTC) #42
commit-bot: I haz the power
Patchset 13 (id:??) landed as https://crrev.com/3f11e42880b1b7b6608e2d57fa538552318367ae Cr-Commit-Position: refs/heads/master@{#418464}
4 years, 3 months ago (2016-09-14 02:57:58 UTC) #44
jbroman
4 years, 3 months ago (2016-09-15 14:52:39 UTC) #45
Message was sent while issue was closed.
A revert of this CL (patchset #13 id:240001) has been created in
https://codereview.chromium.org/2348443002/ by jbroman@chromium.org.

The reason for reverting is: Suspected of causing try flakes in
ContextualSearchManagerTest#testPromoTapCount:

https://bugs.chromium.org/p/chromium/issues/detail?id=647210.

Powered by Google App Engine
This is Rietveld 408576698