• Trent Apted's avatar
    Consolidate PageInfo bubble anchoring logic. · 2410527e
    Trent Apted authored
    Lots of things want to anchor off the page info icon. E.g.,
    permission prompts, the device chooser UI, the first run bubble
    and the page info bubble itself.
    
    Unfortunately, the page info bubble is not always present (in
    fullscreen for example), and we want to anchor toolkit-views bubbles
    off a BrowserView as well as off a BrowserWindowCocoa. So anchoring
    is not simple. Currently the logic that deals with this is scattered
    around the codebase, and some of it is broken (e.g. crbug/745291).
    
    This CL consolidates the anchoring for permission prompts and the
    device chooser UI, for both of their Cocoa and Views versions. The
    first run bubble will also use this in a follow-up.
    
    The PageInfo bubble anchoring is a bit simpler since it can't be
    shown in fullscreen. It's consolidated partially, but it has some
    unnecessary plumbing as well, so more cleanups there are left for
    another follow-up).
    
    Bug: 728160, 745291
    Change-Id: Id8b3bb9284f8dcc83299aa92123d4ee6e58dddc4
    Reviewed-on: https://chromium-review.googlesource.com/575791
    Commit-Queue: Trent Apted <tapted@chromium.org>
    Reviewed-by: default avatarMichael Wasserman <msw@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#488494}
    2410527e
bubble_anchor_util.h 1.07 KB