• Robert Liao's avatar
    Adjust ExtensionPopup Dismissal Behavior · 902d73ba
    Robert Liao authored
    Before, dismissing the ExtensionPopup when the anchor window received
    focus was an arbitrary decision (http://crbug.com/179786) that allowed
    the ExtensionPopup to dismiss at most of the right times. However, if
    the some other top-level window received activation, the ExtensionPopup
    would not dismiss, unlike a typical menu.
    
    This change adjusts the ExtensionPopup to always dismiss when it loses
    activation as long as devtools is not attached.
    
    When devtools is detached, activation is placed back on the
    ExtensionPopup so that the normal dismissal behavior can continue to
    work. Failure to receive activation means the ExtensionPopup will not
    dismiss until it receives activation at least once.
    
    BUG=825867
    
    Change-Id: I802af281616c66013c370e892953ad2805533728
    Reviewed-on: https://chromium-review.googlesource.com/984404Reviewed-by: default avatarScott Violet <sky@chromium.org>
    Reviewed-by: default avatarElly Fong-Jones <ellyjones@chromium.org>
    Commit-Queue: Robert Liao <robliao@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#547391}
    902d73ba
extension_popup.cc 7.46 KB