• Nick Burris's avatar
    [Web Payment] Make PaymentAppProvider use WebContents* · 5012d3ea
    Nick Burris authored
    This patch makes PaymentAppProvider methods take a WebContents* instead
    of BrowserContext*. This is a first step toward making WebContents own
    PaymentAppProviderImpl rather than it being a singleton.
    
    The payment_handler_windows_ map is changed to a single
    payment_handler_window_, but note this is just to remove the
    BrowserContext* key dependency, we still enforce one payment request
    per browser via PaymentRequestDisplayManager.
    
    PaymentAppProviderImpl's RespondWithCallback and callback repository
    still depend on BrowserContext*, since the callback may outlive the
    WebContents. This will be cleaned up in step (3) of the bug, where the
    callbacks will be owned by PaymentAppProviderImpl instead of a singleton
    repository.
    
    Bug: 1075687
    Change-Id: Ib4460b82f9938e973f067f45669a6031f7f0da3c
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2240064Reviewed-by: default avatarRouslan Solomakhin <rouslan@chromium.org>
    Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
    Reviewed-by: default avatarSahel Sharify <sahel@chromium.org>
    Commit-Queue: Nick Burris <nburris@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#779343}
    5012d3ea
payment_app_provider_impl.h 3.5 KB