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

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

Issue 2790013002: PaymentHandler: Implement set/get methods in PaymentInstruments (blink) (Closed)
Patch Set: blink 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
« no previous file with comments | « no previous file | content/browser/payments/payment_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/mojom/payment_request.mojom"; 7 import "components/payments/mojom/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 SetPaymentInstrument(string instrumentKey, PaymentInstrument instrument)
52 => (PaymentHandlerStatus status);
53 GetPaymentInstrument(string instrumentKey)
54 => (PaymentInstrument instrument, PaymentHandlerStatus status);
37 }; 55 };
38 56
39 struct PaymentAppRequest { 57 struct PaymentAppRequest {
40 url.mojom.Url origin; 58 url.mojom.Url origin;
41 array<PaymentMethodData> methodData; 59 array<PaymentMethodData> methodData;
42 PaymentItem total; 60 PaymentItem total;
43 array<PaymentDetailsModifier> modifiers; 61 array<PaymentDetailsModifier> modifiers;
44 string optionId; 62 string optionId;
45 }; 63 };
46 64
47 struct PaymentAppResponse { 65 struct PaymentAppResponse {
48 string method_name; 66 string method_name;
49 string stringified_details; 67 string stringified_details;
50 }; 68 };
51 69
52 // This interface is provided to pass a payment app response from payment 70 // This interface is provided to pass a payment app response from payment
53 // request event in renderer side to browser side by calling respondWith(). 71 // request event in renderer side to browser side by calling respondWith().
54 interface PaymentAppResponseCallback { 72 interface PaymentAppResponseCallback {
55 OnPaymentAppResponse(PaymentAppResponse response, 73 OnPaymentAppResponse(PaymentAppResponse response,
56 mojo.common.mojom.Time dispatch_event_time); 74 mojo.common.mojom.Time dispatch_event_time);
57 }; 75 };
OLDNEW
« no previous file with comments | « no previous file | content/browser/payments/payment_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698