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 service worker based payment apps. |
| 14 */ |
| 15 public class ServiceWorkerPaymentAppBridge { |
| 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 static class Manifest { |
| 23 public String id; |
| 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 static 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 // TODO(tommyt): crbug.com/669876. Implement this function. |
| 47 return new ArrayList<Manifest>(); |
| 48 } |
| 49 } |
OLD | NEW |