• Abhijeet Singh's avatar
    Add focus support for QuickAnswersView · ced8a9b0
    Abhijeet Singh authored
    For the case when a menu is active, QuickAnswersView currently is unable
    to obtain the focus because that would require activating its top-level
    widget, which would cause the menu to disappear like it does on
    observing any change in the activated window.
    
    This CL makes QuickAnswerView's widget a child of the menu's owning
    widget, as a result of which it can now share the owning widget's
    FocusManager and successfully request focus.
    
    This is needed to incorporate keyboard accessibility for the view. Key
    or accelerator handling will be added in follow up CLs.
    
    Tests are also added.
    
    Bug: b:152057976
    Test: Tested on Chrome OS VM and ran ash_unittests.
    Change-Id: I2acbbd5d3f918fffe33d31d8f7764ecf28ffcaec
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2222119Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
    Commit-Queue: Abhijeet Singh <siabhijeet@google.com>
    Cr-Commit-Position: refs/heads/master@{#774371}
    ced8a9b0
quick_answers_view.h 2.91 KB