Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reland: Make PaymentRequest a DocumentService
The PaymentRequest's lifetime is bounded by a) Its mojo receiver's connection b) The current document in the RenderFrameHost that spawned it c) It self-destroys on an error, which acts as a shortcut for a). We would like to: - avoid holding GlobalFrameRoutingIds, and doing null-checks, - avoid the fact that the mojo connection can slightly outlive the RenderFrameHost, and - avoid tracking the fragile-and-ever-changing WebContentsObserver API to manage the object's lifetime. DocumentService will ensure that the PaymentRequest (as its subclass) is destroyed appropriately, and never has a null, or invalid freed pointer back to the RenderFrameHost. This change allows us to remove most of the abstraction of the PaymentRequestWebContentsManager. The PaymentRequest's lifetime is now fully self-managed, and the object can just be created directly. But the PaymentRequestWebContentsManager has to stick around just as a place to hold state that the payments code wants to attach to the WebContents, that is the SPCTransactionMode. R=creis@chromium.org, rouslan@chromium.org Bug: 1251691, 1252046 Change-Id: Ie90c881fbc80abf1f22fcf7c0a2a51c56d143a8e Cq-Include-Trybots: luci.chromium.try:linux-bfcache-rel,android-bfcache-rel Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3311758 Reviewed-by: Avi Drissman <avi@chromium.org> Reviewed-by: Charlie Reis <creis@chromium.org> Reviewed-by: Rouslan Solomakhin <rouslan@chromium.org> Commit-Queue: Avi Drissman <avi@chromium.org> Auto-Submit: danakj chromium <danakj@chromium.org> Cr-Commit-Position: refs/heads/main@{#948181}
- Loading branch information
Showing
23 changed files
with
283 additions
and
445 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.