• Toni Barzic's avatar
    Remove GetAssociatedWebContents from echoPrivate implementation · 3a29af35
    Toni Barzic authored
    GetAssociatedWebContents has been used in echoPrivate.getUserConsent
    to determine to which window to attach the user consent dialog.
    The API function is used from a component echo extension's event page,
    and was relying on GetAssociatedWebContents to select the active tab as
    the target for the dialog (note that this was not always the right
    tab/window to use).
    
    To address this issue, the echoPrivate.getUserConsent has been updated
    to accept tabId, which identifies the tab to use for the user constent
    dialog, and the extension was updated to pass the target tabId in. It
    should now be OK to stop depending on GetAssociatedWebContentsDeprecated
    to select the target tab.
    
    Calls from extension contexts will now require the tabId to be
    specified. The only circumstance the tabId can be omitted is when the
    function is called from a platform app window (in which the sender web
    contents will point to the desired target for the user consent dialog).
    
    BUG=461394
    
    Change-Id: I49c9dd5a8ffd9543bb441bc694dbc929ac8c2782
    Reviewed-on: https://chromium-review.googlesource.com/1054489
    Commit-Queue: Toni Barzic <tbarzic@chromium.org>
    Reviewed-by: default avatarDevlin <rdevlin.cronin@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#558057}
    3a29af35
echo_private_api.cc 10.7 KB