OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 package org.chromium.chrome.browser.payments; | |
6 | |
7 import android.graphics.drawable.Drawable; | |
8 | |
9 import java.util.ArrayList; | |
10 import java.util.List; | |
11 | |
12 /** | |
13 * Native bridge for interacting with web based payment apps. | |
14 */ | |
15 public class WebBasedPaymentAppBridge { | |
16 /** | |
17 * This class represents a payment app manifest as defined in the Payment | |
18 * App API specification. | |
19 * | |
20 * @see https://w3c.github.io/webpayments-payment-apps-api/#payment-app-mani fest | |
21 */ | |
22 public class Manifest { | |
agrieve
2016/11/28 17:59:53
Should these inner classes be static?
tommyt
2016/11/30 13:44:38
Done.
| |
23 public String id; | |
please use gerrit instead
2016/11/29 14:28:44
Manifest does not have an ID field.
tommyt
2016/11/30 13:44:38
True, but the Payment App does have an ID, and I t
zino
2016/11/30 14:04:46
IMHO, you can rename the field to scopeUrl and the
tommyt
2016/11/30 14:14:00
This sounds like a good idea. Maybe this is better
please use gerrit instead
2016/11/30 15:08:28
+1
tommyt
2016/12/01 13:55:49
Done.
| |
24 public String label; | |
25 public Drawable icon; | |
26 public List<Option> options = new ArrayList<>(); | |
27 } | |
28 | |
29 /** | |
30 * This class represents a payment option as defined in the Payment App API | |
31 * specification. | |
32 * | |
33 * @see https://w3c.github.io/webpayments-payment-apps-api/#payment-app-opti ons | |
34 */ | |
35 public class Option { | |
36 public String id; | |
37 public String label; | |
38 public Drawable icon; | |
39 public List<String> enabledMethods = new ArrayList<>(); | |
40 } | |
41 | |
42 /** | |
43 * Get a list of all the installed app manifests. | |
44 */ | |
45 public List<Manifest> getAllAppManifests() { | |
46 // Not yet implemented | |
please use gerrit instead
2016/11/29 14:28:44
Add a TODO.
tommyt
2016/11/30 13:44:38
Done.
| |
47 return new ArrayList<Manifest>(); | |
48 } | |
49 } | |
OLD | NEW |