Index: chrome/android/java/src/org/chromium/chrome/browser/infobar/CardDetail.java |
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/infobar/CardDetail.java b/chrome/android/java/src/org/chromium/chrome/browser/infobar/CardDetail.java |
new file mode 100644 |
index 0000000000000000000000000000000000000000..4a20552c75ab45c8b78636b9a2850347202e5b17 |
--- /dev/null |
+++ b/chrome/android/java/src/org/chromium/chrome/browser/infobar/CardDetail.java |
@@ -0,0 +1,42 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+package org.chromium.chrome.browser.infobar; |
+ |
+import org.chromium.chrome.browser.ResourceId; |
+ |
+/** |
+ * Detailed card information to show in the various Autofill infobars. |
+ */ |
+public class CardDetail { |
+ /** |
+ * The identifier of the drawable of the card issuer icon. |
+ */ |
+ public int issuerIconDrawableId; |
+ |
+ /** |
+ * The label for the card. |
+ */ |
+ public String label; |
+ |
+ /** |
+ * The sub-label for the card. |
+ */ |
+ public String subLabel; |
+ |
+ /** |
+ * Creates a new instance of the detailed card information. |
+ * |
+ * @param enumeratedIconId ID corresponding to the icon that will be shown for this credit |
+ * card. The ID must have been mapped using the ResourceMapper class |
+ * before passing it to this function. |
+ * @param label The credit card label, for example "***1234". |
+ * @param subLabel The credit card sub-label, for example "Exp: 06/17". |
+ */ |
+ public CardDetail(int enumeratedIconId, String label, String subLabel) { |
+ this.issuerIconDrawableId = ResourceId.mapToDrawableId(enumeratedIconId); |
+ this.label = label; |
+ this.subLabel = subLabel; |
+ } |
+} |