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

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

Issue 2875493003: PaymentHandler: Remove PaymentAppManifest and PaymentAppOption. (Closed)
Patch Set: global-interface-listing Created 3 years, 7 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_app.proto » ('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
11 enum PaymentAppManifestError {
12 NONE,
13 NOT_IMPLEMENTED,
14 NO_ACTIVE_WORKER,
15 MANIFEST_STORAGE_OPERATION_FAILED,
16 };
17
18 struct PaymentAppOption {
19 string name;
20 string? icon;
21 string id;
22 array<string> enabled_methods;
23 };
24
25 struct PaymentAppManifest {
26 string name;
27 string? icon;
28 array<PaymentAppOption> options;
29 };
30
31 enum PaymentHandlerStatus { 11 enum PaymentHandlerStatus {
32 SUCCESS, 12 SUCCESS,
33 NOT_IMPLEMENTED, 13 NOT_IMPLEMENTED,
34 NOT_FOUND, 14 NOT_FOUND,
35 NO_ACTIVE_WORKER, 15 NO_ACTIVE_WORKER,
36 STORAGE_OPERATION_FAILED, 16 STORAGE_OPERATION_FAILED,
37 }; 17 };
38 18
39 struct PaymentInstrument { 19 struct PaymentInstrument {
40 string name; 20 string name;
41 array<string> enabled_methods; 21 array<string> enabled_methods;
42 string stringified_capabilities; 22 string stringified_capabilities;
43 }; 23 };
44 24
45 interface PaymentManager { 25 interface PaymentManager {
46 Init(string service_worker_scope); 26 Init(string service_worker_scope);
47 SetManifest(PaymentAppManifest payment_app_manifest)
48 => (PaymentAppManifestError error);
49 GetManifest()
50 => (PaymentAppManifest payment_app_manifest, PaymentAppManifestError error );
51 DeletePaymentInstrument(string instrument_key) 27 DeletePaymentInstrument(string instrument_key)
52 => (PaymentHandlerStatus status); 28 => (PaymentHandlerStatus status);
53 GetPaymentInstrument(string instrument_key) 29 GetPaymentInstrument(string instrument_key)
54 => (PaymentInstrument instrument, PaymentHandlerStatus status); 30 => (PaymentInstrument instrument, PaymentHandlerStatus status);
55 KeysOfPaymentInstruments() 31 KeysOfPaymentInstruments()
56 => (array<string> keys, PaymentHandlerStatus status); 32 => (array<string> keys, PaymentHandlerStatus status);
57 HasPaymentInstrument(string instrument_key) 33 HasPaymentInstrument(string instrument_key)
58 => (PaymentHandlerStatus status); 34 => (PaymentHandlerStatus status);
59 SetPaymentInstrument(string instrument_key, PaymentInstrument instrument) 35 SetPaymentInstrument(string instrument_key, PaymentInstrument instrument)
60 => (PaymentHandlerStatus status); 36 => (PaymentHandlerStatus status);
(...skipping 15 matching lines...) Expand all
76 string method_name; 52 string method_name;
77 string stringified_details; 53 string stringified_details;
78 }; 54 };
79 55
80 // This interface is provided to pass a payment app response from payment 56 // This interface is provided to pass a payment app response from payment
81 // request event in renderer side to browser side by calling respondWith(). 57 // request event in renderer side to browser side by calling respondWith().
82 interface PaymentAppResponseCallback { 58 interface PaymentAppResponseCallback {
83 OnPaymentAppResponse(PaymentAppResponse response, 59 OnPaymentAppResponse(PaymentAppResponse response,
84 mojo.common.mojom.Time dispatch_event_time); 60 mojo.common.mojom.Time dispatch_event_time);
85 }; 61 };
OLDNEW
« no previous file with comments | « no previous file | content/browser/payments/payment_app.proto » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698