• Charlie Harrison's avatar
    [Android] simplify pop-up infobar creation · c84a9392
    Charlie Harrison authored
    Right now popups have a strange relationship with
    TabSpecificContentSettings.
    
    Right now: the infobar is opened if:
     - A global NOTIFICATION_WEB_CONTENT_SETTINGS_CHANGED is received
     - !IsBlockageIndicated(POPUPS) in TSCS
     - There are blocked popups
    
    At first glance this seems reasonable. However, popups do not abide
    by the typical TSCS notion of blockage being indicated. On Android,
    we create a new infobar for every new popup blocked. On Desktop, these
    new popups do not trigger another animation of the blocked image.
    
    So, TSCS has android specific logic which resets the "indicated" bit
    every time popups are marked as blocked.
    
    This CL simplifies this complex interaction by removing it completely.
    The PopupBlockerTabHelper is now responsible for the straightforward
    creation of the infobar.
    
    This CL has no (%comment) intended behavior change.
    
    Bug: 900645
    Change-Id: I440b9b3b6f8d160f1b4d34f8fb7f566dc7dfb72d
    Reviewed-on: https://chromium-review.googlesource.com/c/1308635
    Commit-Queue: Charlie Harrison <csharrison@chromium.org>
    Reviewed-by: default avatarMatthew Jones <mdjones@chromium.org>
    Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#605704}
    c84a9392
tab_android.cc 36.1 KB