| Index: components/payments/mojom/payment_app.mojom
|
| diff --git a/components/payments/mojom/payment_app.mojom b/components/payments/mojom/payment_app.mojom
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..f7eae0a4fdd2158202c5876c31694f92853ee763
|
| --- /dev/null
|
| +++ b/components/payments/mojom/payment_app.mojom
|
| @@ -0,0 +1,57 @@
|
| +// 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.
|
| +
|
| +module payments.mojom;
|
| +
|
| +import "components/payments/mojom/payment_request.mojom";
|
| +import "mojo/common/time.mojom";
|
| +import "url/mojo/url.mojom";
|
| +
|
| +enum PaymentAppManifestError {
|
| + NONE,
|
| + NOT_IMPLEMENTED,
|
| + NO_ACTIVE_WORKER,
|
| + MANIFEST_STORAGE_OPERATION_FAILED,
|
| +};
|
| +
|
| +struct PaymentAppOption {
|
| + string name;
|
| + string? icon;
|
| + string id;
|
| + array<string> enabled_methods;
|
| +};
|
| +
|
| +struct PaymentAppManifest {
|
| + string name;
|
| + string? icon;
|
| + array<PaymentAppOption> options;
|
| +};
|
| +
|
| +interface PaymentManager {
|
| + Init(string service_worker_scope);
|
| + SetManifest(PaymentAppManifest payment_app_manifest)
|
| + => (PaymentAppManifestError error);
|
| + GetManifest()
|
| + => (PaymentAppManifest payment_app_manifest, PaymentAppManifestError error);
|
| +};
|
| +
|
| +struct PaymentAppRequest {
|
| + url.mojom.Url origin;
|
| + array<PaymentMethodData> methodData;
|
| + PaymentItem total;
|
| + array<PaymentDetailsModifier> modifiers;
|
| + string optionId;
|
| +};
|
| +
|
| +struct PaymentAppResponse {
|
| + string method_name;
|
| + string stringified_details;
|
| +};
|
| +
|
| +// This interface is provided to pass a payment app response from payment
|
| +// request event in renderer side to browser side by calling respondWith().
|
| +interface PaymentAppResponseCallback {
|
| + OnPaymentAppResponse(PaymentAppResponse response,
|
| + mojo.common.mojom.Time dispatch_event_time);
|
| +};
|
|
|