• Donn Denman's avatar
    [TTS][RSearches] Support Related Searches Tap w/o selection. · 9c09335c
    Donn Denman authored
    Adds support for displaying Related Searches using the existing
    Contextual Search UX. The main differences are:
    1) Tap does not select anything when Related Searches is enabled.
    2) Clicks in the Overlay don't promote to a new tab when they are
       only one level deep but do promote to a separate tab after that.
    
    When Related Searches are enabled the Long-press
    triggering is automatically enabled so a Long-press resolves normally
    but a Tap generates a Related Search without any selection.
    
    The treatment of the selection is gated by the Feature with a
    non-empty selection unless the Feature is active (allowing an
    insertion point).
    
    All significant functional changes are behind the RelatedSearches
    Feature flag.  Functions that have been changed to accommodate this
    Feature have tests: Context allows an insertion-point and the
    SearchRequest allows non-Google URLs when the Feature is active.
    
    Also removed some unused code.
    
    BUG=1062737
    
    Change-Id: I4b8f133398890c214d26e968c2ede6a1ba08618a
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2200437
    Commit-Queue: Donn Denman <donnd@chromium.org>
    Auto-Submit: Donn Denman <donnd@chromium.org>
    Reviewed-by: default avatarTheresa  <twellington@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#769510}
    9c09335c
contextual_search_delegate.cc 24.2 KB