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

Issue 1205033005: Adds selection expansion support for Contextual Search. (Closed)

Created:
5 years, 6 months ago by aurimas (slooooooooow)
Modified:
5 years, 5 months ago
CC:
chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, jam, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-content_chromium.org, nasko+codewatch_chromium.org, site-isolation-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Adds selection expansion support for Contextual Search. This CL adds functionality to expand the existing text selection when the contextual search server returns what the user is most likely to search for. BUG=396738 Committed: https://crrev.com/ab031902f8b4b8a0fb9892435f1ccdbad30e89cf Cr-Commit-Position: refs/heads/master@{#338374}

Patch Set 1 #

Total comments: 10

Patch Set 2 : Renamed MoveSelection to ExpandSelection #

Patch Set 3 : Rebase #

Patch Set 4 : Fix expansions #

Total comments: 9

Patch Set 5 : pedrosimonetti nits #

Total comments: 3

Patch Set 6 : Switch from RenderView to RenderFrame #

Total comments: 5

Patch Set 7 : creis nits #

Total comments: 8

Patch Set 8 : palmer's nits #

Patch Set 9 : Add bug number #

Total comments: 4

Patch Set 10 : palmer's comments #

Total comments: 7

Patch Set 11 : Add more tests #

Patch Set 12 : Fixed java tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+374 lines, -44 lines) Patch
M chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManager.java View 1 2 3 4 5 6 7 2 chunks +13 lines, -3 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchNetworkCommunicator.java View 1 chunk +6 lines, -1 line 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchSelectionController.java View 1 2 3 4 5 6 7 8 3 chunks +26 lines, -0 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchFakeServer.java View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +4 lines, -2 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 2 chunks +7 lines, -3 lines 0 comments Download
M chrome/browser/android/contextualsearch/contextual_search_delegate.h View 1 2 3 4 5 6 7 8 9 4 chunks +18 lines, -5 lines 0 comments Download
M chrome/browser/android/contextualsearch/contextual_search_delegate.cc View 1 2 3 4 5 6 7 8 9 7 chunks +46 lines, -3 lines 0 comments Download
M chrome/browser/android/contextualsearch/contextual_search_delegate_unittest.cc View 1 2 3 4 5 6 7 8 9 10 9 chunks +164 lines, -16 lines 0 comments Download
M chrome/browser/android/contextualsearch/contextual_search_manager.h View 1 chunk +3 lines, -1 line 0 comments Download
M chrome/browser/android/contextualsearch/contextual_search_manager.cc View 2 chunks +6 lines, -9 lines 0 comments Download
M content/browser/web_contents/web_contents_android.h View 1 2 3 4 5 6 7 1 chunk +4 lines, -1 line 0 comments Download
M content/browser/web_contents/web_contents_android.cc View 1 2 3 4 5 6 7 1 chunk +7 lines, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +10 lines, -0 lines 0 comments Download
M content/common/input_messages.h View 1 2 3 4 5 6 7 1 chunk +8 lines, -0 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java View 1 2 3 4 5 6 7 2 chunks +8 lines, -0 lines 0 comments Download
M content/public/android/java/src/org/chromium/content_public/browser/WebContents.java View 1 2 3 4 5 6 7 1 chunk +9 lines, -0 lines 0 comments Download
M content/public/browser/web_contents.h View 1 2 3 4 5 6 7 1 chunk +7 lines, -0 lines 0 comments Download
M content/renderer/render_frame_impl.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +25 lines, -0 lines 0 comments Download

Messages

Total messages: 45 (12 generated)
aurimas (slooooooooow)
dtrainor: content/public/android and chrome/browser/android pedrosimonetti: general review
5 years, 6 months ago (2015-06-25 00:07:23 UTC) #2
David Trainor- moved to gerrit
lgtm with nits https://chromiumcodereview.appspot.com/1205033005/diff/1/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/1205033005/diff/1/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchSelectionController.java#newcode260 chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchSelectionController.java:260: void adjustSelection(int selectionStartAdjust, int selectionEndAdjust) { ...
5 years, 6 months ago (2015-06-25 00:34:55 UTC) #3
pedro (no code reviews)
Overall, this CL looks good to me. I think we can improve the name of ...
5 years, 6 months ago (2015-06-25 01:30:28 UTC) #4
aurimas (slooooooooow)
+palmer for content/common/view_messages.h +tedchoc for content/browser/web_contents/* and content/public/android/* +sievers for content/browser/renderer_host/* content/renderer/* content/public/browser/* https://chromiumcodereview.appspot.com/1205033005/diff/1/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManager.java File ...
5 years, 5 months ago (2015-07-01 00:45:38 UTC) #6
pedro (no code reviews)
lgtm Thanks Aurimas, Contextual Search code looks good to me. Just posted a few nits. ...
5 years, 5 months ago (2015-07-01 22:18:57 UTC) #7
aurimas (slooooooooow)
https://chromiumcodereview.appspot.com/1205033005/diff/60001/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManager.java File chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManager.java (right): https://chromiumcodereview.appspot.com/1205033005/diff/60001/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManager.java#newcode643 chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManager.java:643: * the search term. On 2015/07/01 at 22:18:56, pedrosimonetti ...
5 years, 5 months ago (2015-07-01 23:05:45 UTC) #8
pedro (no code reviews)
https://codereview.chromium.org/1205033005/diff/60001/content/renderer/render_view_impl.cc File content/renderer/render_view_impl.cc (right): https://codereview.chromium.org/1205033005/diff/60001/content/renderer/render_view_impl.cc#newcode1409 content/renderer/render_view_impl.cc:1409: webview()->focusedFrame()->toWebLocalFrame(); On 2015/07/01 23:05:44, aurimas wrote: > On 2015/07/01 ...
5 years, 5 months ago (2015-07-02 00:09:57 UTC) #9
aurimas (slooooooooow)
+yoichio: please take a look at content/render/render_view_impl.*
5 years, 5 months ago (2015-07-02 00:20:36 UTC) #11
yoichio
lgtm
5 years, 5 months ago (2015-07-02 04:19:57 UTC) #12
aurimas (slooooooooow)
Post 4th of July ping: +palmer for content/common/view_messages.h +tedchoc for content/browser/web_contents/* and content/public/android/* +sievers for ...
5 years, 5 months ago (2015-07-06 18:15:16 UTC) #13
Ted C
On 2015/07/06 18:15:16, aurimas wrote: > Post 4th of July ping: > > +palmer for ...
5 years, 5 months ago (2015-07-06 20:56:46 UTC) #14
aurimas (slooooooooow)
Since sievers@ is OOO: +aelias for content/browser/renderer_host/* +creis for content/renderer/*
5 years, 5 months ago (2015-07-06 21:00:22 UTC) #16
aelias_OOO_until_Jul13
content/browser/renderer_host/ lgtm
5 years, 5 months ago (2015-07-06 21:08:17 UTC) #17
Charlie Reis
https://codereview.chromium.org/1205033005/diff/80001/content/public/browser/render_view_host.h File content/public/browser/render_view_host.h (right): https://codereview.chromium.org/1205033005/diff/80001/content/public/browser/render_view_host.h#newcode55 content/public/browser/render_view_host.h:55: // DEPRECATED: RenderViewHost is being removed as part of ...
5 years, 5 months ago (2015-07-06 21:30:41 UTC) #18
Charlie Reis
[+site-isolation-reviews, in case we need to track changes for OOPIF support for text selection.]
5 years, 5 months ago (2015-07-06 21:32:15 UTC) #19
aurimas (slooooooooow)
creis: please take another look. I moved over to using render_frame_*, but I am not ...
5 years, 5 months ago (2015-07-07 00:49:12 UTC) #20
Charlie Reis
Thanks! That's much better. content/ LGTM with nits, though it would be nice to have ...
5 years, 5 months ago (2015-07-07 17:02:28 UTC) #21
aurimas (slooooooooow)
https://chromiumcodereview.appspot.com/1205033005/diff/100001/content/public/browser/web_contents.h File content/public/browser/web_contents.h (right): https://chromiumcodereview.appspot.com/1205033005/diff/100001/content/public/browser/web_contents.h#newcode420 content/public/browser/web_contents.h:420: // Notify the render view host to adjust the ...
5 years, 5 months ago (2015-07-07 18:18:05 UTC) #22
aurimas (slooooooooow)
tedchoc: could you take another pass at content/browser/web_contents as I changed the code to use ...
5 years, 5 months ago (2015-07-07 18:19:09 UTC) #23
palmer
I'm not fully clear on the intended semantics, as you can see. Apologies if it's ...
5 years, 5 months ago (2015-07-07 18:40:00 UTC) #24
aurimas (slooooooooow)
palmer@ could you please take another pass? https://chromiumcodereview.appspot.com/1205033005/diff/120001/chrome/browser/android/contextualsearch/contextual_search_delegate.cc File chrome/browser/android/contextualsearch/contextual_search_delegate.cc (right): https://chromiumcodereview.appspot.com/1205033005/diff/120001/chrome/browser/android/contextualsearch/contextual_search_delegate.cc#newcode161 chrome/browser/android/contextualsearch/contextual_search_delegate.cc:161: end_adjust = ...
5 years, 5 months ago (2015-07-09 00:20:50 UTC) #25
palmer
https://codereview.chromium.org/1205033005/diff/160001/chrome/browser/android/contextualsearch/contextual_search_delegate.cc File chrome/browser/android/contextualsearch/contextual_search_delegate.cc (right): https://codereview.chromium.org/1205033005/diff/160001/chrome/browser/android/contextualsearch/contextual_search_delegate.cc#newcode169 chrome/browser/android/contextualsearch/contextual_search_delegate.cc:169: end_adjust = mention_end - context_->end_offset; Do you also need ...
5 years, 5 months ago (2015-07-09 21:15:17 UTC) #26
aurimas (slooooooooow)
https://codereview.chromium.org/1205033005/diff/160001/chrome/browser/android/contextualsearch/contextual_search_delegate.cc File chrome/browser/android/contextualsearch/contextual_search_delegate.cc (right): https://codereview.chromium.org/1205033005/diff/160001/chrome/browser/android/contextualsearch/contextual_search_delegate.cc#newcode169 chrome/browser/android/contextualsearch/contextual_search_delegate.cc:169: end_adjust = mention_end - context_->end_offset; On 2015/07/09 at 21:15:16, ...
5 years, 5 months ago (2015-07-10 01:46:49 UTC) #27
Donn Denman
LGTM -- just a nit and a suggestion. Thanks! https://chromiumcodereview.appspot.com/1205033005/diff/180001/chrome/browser/android/contextualsearch/contextual_search_delegate_unittest.cc File chrome/browser/android/contextualsearch/contextual_search_delegate_unittest.cc (right): https://chromiumcodereview.appspot.com/1205033005/diff/180001/chrome/browser/android/contextualsearch/contextual_search_delegate_unittest.cc#newcode278 chrome/browser/android/contextualsearch/contextual_search_delegate_unittest.cc:278: ...
5 years, 5 months ago (2015-07-10 17:47:03 UTC) #29
palmer
LGTM. Maybe add some weirder test cases. https://codereview.chromium.org/1205033005/diff/180001/chrome/browser/android/contextualsearch/contextual_search_delegate_unittest.cc File chrome/browser/android/contextualsearch/contextual_search_delegate_unittest.cc (right): https://codereview.chromium.org/1205033005/diff/180001/chrome/browser/android/contextualsearch/contextual_search_delegate_unittest.cc#newcode278 chrome/browser/android/contextualsearch/contextual_search_delegate_unittest.cc:278: CreateSearchContextAndRequestSearchTerm("Barack", surrounding, ...
5 years, 5 months ago (2015-07-10 17:53:38 UTC) #30
aurimas (slooooooooow)
https://chromiumcodereview.appspot.com/1205033005/diff/180001/chrome/browser/android/contextualsearch/contextual_search_delegate_unittest.cc File chrome/browser/android/contextualsearch/contextual_search_delegate_unittest.cc (right): https://chromiumcodereview.appspot.com/1205033005/diff/180001/chrome/browser/android/contextualsearch/contextual_search_delegate_unittest.cc#newcode278 chrome/browser/android/contextualsearch/contextual_search_delegate_unittest.cc:278: CreateSearchContextAndRequestSearchTerm("Barack", surrounding, 0, 6); On 2015/07/10 at 17:53:38, palmer ...
5 years, 5 months ago (2015-07-10 19:06:00 UTC) #31
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1205033005/200001
5 years, 5 months ago (2015-07-10 19:07:09 UTC) #34
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: android_compile_dbg on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/android_compile_dbg/builds/35230) (exceeded global ...
5 years, 5 months ago (2015-07-10 19:26:55 UTC) #36
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1205033005/220001
5 years, 5 months ago (2015-07-10 20:40:45 UTC) #39
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 5 months ago (2015-07-10 21:46:43 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1205033005/220001
5 years, 5 months ago (2015-07-10 21:51:40 UTC) #43
commit-bot: I haz the power
Committed patchset #12 (id:220001)
5 years, 5 months ago (2015-07-10 21:57:54 UTC) #44
commit-bot: I haz the power
5 years, 5 months ago (2015-07-10 21:58:49 UTC) #45
Message was sent while issue was closed.
Patchset 12 (id:??) landed as
https://crrev.com/ab031902f8b4b8a0fb9892435f1ccdbad30e89cf
Cr-Commit-Position: refs/heads/master@{#338374}

Powered by Google App Engine
This is Rietveld 408576698