• David Black's avatar
    Refactor Assistant proactive suggestions logic in ash. · eaf6dcee
    David Black authored
    Proactive suggestions controller logic in ash currently lives in
    AssistantUiController. It makes use of some of the same logic as
    standalone Assistant UI (e.g. for calculating usable work area).
    
    Proactive suggestions logic has grown and will grow again soon as we
    update triggering conditions (to only show UI as a result of user
    scrolling activity). This is going to further muddy the
    AssistantUiController if added to the code in its current state.
    
    To address this, I've refactored Proactive suggestions controller logic
    into AssistantProactiveSuggestionsController, a sub-controller owned by
    the AssistantSuggestionsController. It is fairly self-contained and
    copies some logic (e.g. for calculating usable work area) from the
    AssistantUiController. This will make it much easier to clean up the
    AssistantUiController when standalone UI is deprecated.
    
    Bug: b:142144655
    Change-Id: I10f4892ae166618a588505d75634c6c18a7cc6d0
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1906935Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
    Reviewed-by: default avatarXiaohui Chen <xiaohuic@chromium.org>
    Commit-Queue: David Black <dmblack@google.com>
    Cr-Commit-Position: refs/heads/master@{#715449}
    eaf6dcee
assistant_suggestions_model.h 2.28 KB