This repository has been archived by the owner on Jul 18, 2018. It is now read-only.
forked from ChromiumWebApps/chromium
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Merge M-56] Add canMakeActivePayment() method to web payments.
canMakeActivePayment() is a proposed function on PaymentRequest object. Proposal: https://github.com/zkoch/zkoch.github.io/blob/master/pr-detect-avail.md Example usage: pr.canMakeActivePayment() .then(result => { if (result) return pr.show(); }) .catch(error => { console.log(error); }); When canMakeActivePayment() is called, Chrome stores the website origin and the payment methods that it's checking in memory. That's shared across the whole browser, in global state. (Not storing this on disk, so the user can clear this data via browser restart.) Then Chrome starts a timer for 30 minutes. When the timer fires, Chrome removes that origin and the payment methods that it was checking from the list. If the same origin tries to check different payment methods within the 30 minute window, Chrome rejects that request. If canMakeActivePayment() is rejected, then pr.show() can still be called regardless. Intent to implement and ship: https://groups.google.com/a/chromium.org/d/msg/blink-dev/IoIxRpn6l9g/ux1C1Cj7AQAJ Tag review: w3ctag/design-reviews#146 OWP launch tracking bug: http://crbug.com/664619 Link to entry on the feature dashboard: https://www.chromestatus.com/feature/5702608073261056 The feature is behind chrome://flags/#enable-experimental-web-platform-features until it is approved to ship. BUG=662931,664619 Review-Url: https://codereview.chromium.org/2467393002 Cr-Commit-Position: refs/heads/master@{#433164} (cherry picked from commit 5132963) Review URL: https://codereview.chromium.org/2516923002 . Cr-Commit-Position: refs/branch-heads/2924@{#11} Cr-Branched-From: 3a87aec-refs/heads/master@{#433059}
- Loading branch information
1 parent
bacaf59
commit cb165c5
Showing
23 changed files
with
821 additions
and
56 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
Oops, something went wrong.