| This directory contains shared code used by multiple platforms' native |
| implementations of PaymentRequest. In general, business logic (i.e., logic which |
| manipulates data and is not specific to any particular platform's display of the |
| data) should live here as much as possible. |
| |
| |
| Internally, the directory uses the Layered Components model: |
| |
| http://www.chromium.org/developers/design-documents/layered-components-design |
| |
| |
| In practical terms, our division between content/ and core/ is usually just a |
| question of whether the contents have a dependency on Mojo: |
| |
| * ./core/ -- preferred whenever possible |
| |
| * ./content/ -- code with a Mojo dependency |
| |
| * ./content/android/ -- Android bindings for code in either core/ or content/ |
| |
| |
| Intended consumers of this code are organized as follows: |
| |
| * chrome/android/.../chrome/browser/payments/ -- Android UI Implementation |
| |
| * chrome/browser/ui/views/payments/ -- Desktop UI implementation |
| |
| * content/browser/android/payments -- Android bindings for PaymentApps |
| |
| * content/browser/payments/ -- PaymentApps implementation |
| |
| The payment flow initiates in Blink: |
| |
| * third_party/blink/renderer/modules/payments/payment_request.h |
| |
| The Blink module communicates to the browser via Mojo: |
| |
| * third_party/blink/public/mojom/payments/payment_request.mojom |
| |
| There are two implementations for the Mojo service in the browser: |
| |
| * Desktop: components/payments/content/payment_request.h |
| * Android: components/payments/content/android/java/src/org/chromium/components/payments/PaymentRequestService.java |