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

Side by Side Diff: components/payments/content/payment_app.mojom

Issue 2790013002: PaymentHandler: Implement set/get methods in PaymentInstruments (blink) (Closed)
Patch Set: ss Created 3 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 module payments.mojom; 5 module payments.mojom;
6 6
7 import "components/payments/content/payment_request.mojom"; 7 import "components/payments/content/payment_request.mojom";
8 import "mojo/common/time.mojom"; 8 import "mojo/common/time.mojom";
9 import "url/mojo/url.mojom"; 9 import "url/mojo/url.mojom";
10 10
(...skipping 10 matching lines...) Expand all
21 string id; 21 string id;
22 array<string> enabled_methods; 22 array<string> enabled_methods;
23 }; 23 };
24 24
25 struct PaymentAppManifest { 25 struct PaymentAppManifest {
26 string name; 26 string name;
27 string? icon; 27 string? icon;
28 array<PaymentAppOption> options; 28 array<PaymentAppOption> options;
29 }; 29 };
30 30
31 enum PaymentHandlerStatus {
32 SUCCESS,
33 NOT_IMPLEMENTED,
34 NOT_FOUND,
35 NO_ACTIVE_WORKER,
36 STORAGE_OPERATION_FAILED,
37 };
38
39 struct PaymentInstrument {
40 string name;
41 array<string> enabled_methods;
42 string stringified_capabilities;
43 };
44
31 interface PaymentManager { 45 interface PaymentManager {
32 Init(string service_worker_scope); 46 Init(string service_worker_scope);
33 SetManifest(PaymentAppManifest payment_app_manifest) 47 SetManifest(PaymentAppManifest payment_app_manifest)
34 => (PaymentAppManifestError error); 48 => (PaymentAppManifestError error);
35 GetManifest() 49 GetManifest()
36 => (PaymentAppManifest payment_app_manifest, PaymentAppManifestError error ); 50 => (PaymentAppManifest payment_app_manifest, PaymentAppManifestError error );
51
52 SetPaymentInstrument(string instrumentKey, PaymentInstrument instrument)
53 => (PaymentHandlerStatus status);
54 GetPaymentInstrument(string instrumentKey)
55 => (PaymentInstrument instrument, PaymentHandlerStatus status);
37 }; 56 };
38 57
39 struct PaymentAppRequest { 58 struct PaymentAppRequest {
40 url.mojom.Url origin; 59 url.mojom.Url origin;
41 array<PaymentMethodData> methodData; 60 array<PaymentMethodData> methodData;
42 PaymentItem total; 61 PaymentItem total;
43 array<PaymentDetailsModifier> modifiers; 62 array<PaymentDetailsModifier> modifiers;
44 string optionId; 63 string optionId;
45 }; 64 };
46 65
47 struct PaymentAppResponse { 66 struct PaymentAppResponse {
48 string method_name; 67 string method_name;
49 string stringified_details; 68 string stringified_details;
50 }; 69 };
51 70
52 // This interface is provided to pass a payment app response from payment 71 // This interface is provided to pass a payment app response from payment
53 // request event in renderer side to browser side by calling respondWith(). 72 // request event in renderer side to browser side by calling respondWith().
54 interface PaymentAppResponseCallback { 73 interface PaymentAppResponseCallback {
55 OnPaymentAppResponse(PaymentAppResponse response, 74 OnPaymentAppResponse(PaymentAppResponse response,
56 mojo.common.mojom.Time dispatch_event_time); 75 mojo.common.mojom.Time dispatch_event_time);
57 }; 76 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698