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

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

Issue 2925063003: [Payments] Implement payment instrument icons (Closed)
Patch Set: rebase Created 3 years, 6 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/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 PaymentHandlerStatus { 11 enum PaymentHandlerStatus {
12 SUCCESS, 12 SUCCESS,
13 NOT_IMPLEMENTED, 13 NOT_IMPLEMENTED,
14 NOT_FOUND, 14 NOT_FOUND,
15 NO_ACTIVE_WORKER, 15 NO_ACTIVE_WORKER,
16 STORAGE_OPERATION_FAILED, 16 STORAGE_OPERATION_FAILED,
17 FETCH_INSTRUMENT_ICON_FAILED,
18 };
19
20 struct ImageObject {
21 string src;
please use gerrit instead 2017/06/08 21:34:10 use mojom.url.GURL instead.
gogerald1 2017/06/09 14:23:24 Why using mojom.url.GURL? PaymentInstruments has g
please use gerrit instead 2017/06/09 14:52:53 A strict IPC interface is better for security. (Th
gogerald1 2017/06/09 18:50:55 as talked offline
22 string sizes;
please use gerrit instead 2017/06/08 21:34:10 This is never used. Discard, please. If you need i
gogerald1 2017/06/09 14:23:24 This is used by get interface. We could decode it
please use gerrit instead 2017/06/09 14:52:53 All additional parameters increase the attack surf
gogerald1 2017/06/09 18:50:56 Done.
23 string type;
please use gerrit instead 2017/06/08 21:34:10 This is never used. Discard, please. If you need i
gogerald1 2017/06/09 14:23:23 ditto
gogerald1 2017/06/09 18:50:55 Done.
17 }; 24 };
18 25
19 struct PaymentInstrument { 26 struct PaymentInstrument {
20 string name; 27 string name;
28 array<ImageObject> icons;
21 array<string> enabled_methods; 29 array<string> enabled_methods;
22 string stringified_capabilities; 30 string stringified_capabilities;
23 }; 31 };
24 32
25 interface PaymentManager { 33 interface PaymentManager {
26 Init(string service_worker_scope); 34 Init(string service_worker_scope);
27 DeletePaymentInstrument(string instrument_key) 35 DeletePaymentInstrument(string instrument_key)
28 => (PaymentHandlerStatus status); 36 => (PaymentHandlerStatus status);
29 GetPaymentInstrument(string instrument_key) 37 GetPaymentInstrument(string instrument_key)
30 => (PaymentInstrument instrument, PaymentHandlerStatus status); 38 => (PaymentInstrument instrument, PaymentHandlerStatus status);
(...skipping 21 matching lines...) Expand all
52 string method_name; 60 string method_name;
53 string stringified_details; 61 string stringified_details;
54 }; 62 };
55 63
56 // This interface is provided to pass a payment app response from payment 64 // This interface is provided to pass a payment app response from payment
57 // request event in renderer side to browser side by calling respondWith(). 65 // request event in renderer side to browser side by calling respondWith().
58 interface PaymentAppResponseCallback { 66 interface PaymentAppResponseCallback {
59 OnPaymentAppResponse(PaymentAppResponse response, 67 OnPaymentAppResponse(PaymentAppResponse response,
60 mojo.common.mojom.Time dispatch_event_time); 68 mojo.common.mojom.Time dispatch_event_time);
61 }; 69 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698