[Web Payment] Make PaymentAppProvider use WebContents*
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:Rouslan Solomakhin <rouslan@chromium.org> Reviewed-by:
Avi Drissman <avi@chromium.org> Reviewed-by:
Sahel Sharify <sahel@chromium.org> Commit-Queue: Nick Burris <nburris@chromium.org> Cr-Commit-Position: refs/heads/master@{#779343}
Showing
Please register or sign in to comment