Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(223)

Unified Diff: third_party/WebKit/public/platform/modules/payments/payment_request.mojom

Issue 2406923002: Move payment_request.mojom file to components/ (Closed)
Patch Set: Add Android test dependencies Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/public/platform/modules/payments/OWNERS ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/public/platform/modules/payments/payment_request.mojom
diff --git a/third_party/WebKit/public/platform/modules/payments/payment_request.mojom b/third_party/WebKit/public/platform/modules/payments/payment_request.mojom
deleted file mode 100644
index f667e44f55ad9b65edf6594a405b5265cb48c219..0000000000000000000000000000000000000000
--- a/third_party/WebKit/public/platform/modules/payments/payment_request.mojom
+++ /dev/null
@@ -1,145 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-[JavaPackage="org.chromium.payments.mojom"]
-module blink.mojom;
-
-// The shipping address that the browser process provides to the renderer
-// process. Built either by the browser or a payment app.
-struct PaymentAddress {
- // ISO 3166 country code. Two upper case ASCII letters.
- string country;
-
- array<string> address_line;
- string region;
- string city;
- string dependent_locality;
- string postal_code;
- string sorting_code;
-
- // Optional shortest ISO 639 language code. Two or three lower case ASCII
- // letters.
- string language_code;
-
- // Optional ISO 15924 script code. Four ASCII letters. The first letter is
- // upper case; the rest are lower case.
- string script_code;
-
- string organization;
- string recipient;
- string phone;
-};
-
-// The currency amount that the renderer provides to the browser process. The
-// browser shows the amount in UI and forwards it on to the payment app, if it
-// requires the amount.
-struct PaymentCurrencyAmount {
- // The most common identifiers are three-letter alphabetic codes as defined
- // by [ISO4217] (for example, "USD" for US Dollars), however any string of at
- // most 2048 characters is considered valid.
- string currency;
-
- // ISO 20022 CurrencyAnd30Amount. Up to 30 total digits. Up to 10 fraction
- // digits. Separated by a dot.
- string value;
-};
-
-struct PaymentResponse {
- string method_name;
-
- // Payment method specific JSON string that is built either by the browser or
- // a payment app, for example Android Pay. Browser ensures that the string can
- // be successfully parsed into base::JSONParser. Renderer parses this string
- // via v8::JSON::Parse() and hands off the result to the merchant website.
- // There's no one format for this object, so richer types cannot be used. A
- // simple example:
- //
- // {"nameOnCard": "Jon Doe", "pan": "4111 1111 1111 1111"}
- string stringified_details;
-
- PaymentAddress? shipping_address;
- string? shipping_option;
- string? payer_name;
- string? payer_email;
- string? payer_phone;
-};
-
-enum PaymentErrorReason {
- UNKNOWN,
- USER_CANCEL,
- NOT_SUPPORTED
-};
-
-interface PaymentRequestClient {
- OnShippingAddressChange(PaymentAddress address);
- OnShippingOptionChange(string shipping_option_id);
- OnPaymentResponse(PaymentResponse response);
- OnError(PaymentErrorReason error);
- OnComplete();
- OnAbort(bool aborted_successfully);
-};
-
-struct PaymentItem {
- string label;
- PaymentCurrencyAmount amount;
-};
-
-struct PaymentShippingOption {
- string id;
- string label;
- PaymentCurrencyAmount amount;
- bool selected;
-};
-
-struct PaymentDetailsModifier {
- array<string> supported_methods;
- PaymentItem total;
- array<PaymentItem> additional_display_items;
-};
-
-struct PaymentDetails {
- PaymentItem total;
- array<PaymentItem> display_items;
- array<PaymentShippingOption> shipping_options;
- array<PaymentDetailsModifier> modifiers;
- string error;
-};
-
-struct PaymentOptions {
- bool request_payer_name;
- bool request_payer_email;
- bool request_payer_phone;
- bool request_shipping;
-};
-
-struct PaymentMethodData {
- array<string> supported_methods;
- // A JSON string built by the renderer from a JavaScript object that the
- // merchant website provides. The renderer uses
- // blink::JSONObject::toJSONString() to generate this string. The browser
- // parses the string via JSONObject(JsonSanitizer.sanitize(stringified_data))
- // and passes a part of the JSON object to the payment app, for example
- // Android Pay. There's no one format for this object, so richer types cannot
- // be used. A simple example:
- //
- // {"gateway": "stripe"}
- string stringified_data;
-};
-
-enum PaymentComplete {
- SUCCESS,
- FAIL,
- UNKNOWN
-};
-
-interface PaymentRequest {
- Init(PaymentRequestClient client,
- array<PaymentMethodData> methodData,
- PaymentDetails details,
- PaymentOptions options);
- Show();
- UpdateWith(PaymentDetails details);
- Abort();
- Complete(PaymentComplete result);
-};
« no previous file with comments | « third_party/WebKit/public/platform/modules/payments/OWNERS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698