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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentOption.java

Issue 2766413003: test (Closed)
Patch Set: format Created 3 years, 8 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 package org.chromium.chrome.browser.payments.ui; 5 package org.chromium.chrome.browser.payments.ui;
6 6
7 import android.graphics.drawable.Drawable; 7 import android.graphics.drawable.Drawable;
8 8
9 import javax.annotation.Nullable; 9 import javax.annotation.Nullable;
10 10
11 /** 11 /**
12 * An option that the user can select, e.g., a shipping option, a shipping addre ss, or a payment 12 * An option that the user can select, e.g., a shipping option, a shipping addre ss, or a payment
13 * method. 13 * method.
14 */ 14 */
15 public class PaymentOption implements Completable { 15 public class PaymentOption implements Completable {
16 protected boolean mIsComplete; 16 protected boolean mIsComplete;
17 protected boolean mIsEditable; 17 protected boolean mIsEditable;
18 protected boolean mIsPaymentCard;
18 protected String mEditMessage; 19 protected String mEditMessage;
19 protected String mEditTitle; 20 protected String mEditTitle;
20 private String mId; 21 private String mId;
21 private Drawable mIcon; 22 private Drawable mIcon;
22 private String[] mLabels = {null, null, null}; 23 private String[] mLabels = {null, null, null};
23 private boolean mIsValid = true; 24 private boolean mIsValid = true;
24 25
25 /** See {@link #PaymentOption(String, String, String, String, int)}. */ 26 /** See {@link #PaymentOption(String, String, String, String, int)}. */
26 public PaymentOption(String id, @Nullable String label, @Nullable String sub label, 27 public PaymentOption(String id, @Nullable String label, @Nullable String sub label,
27 @Nullable Drawable icon) { 28 @Nullable Drawable icon) {
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 173
173 /** @return True if this option is valid. */ 174 /** @return True if this option is valid. */
174 public boolean isValid() { 175 public boolean isValid() {
175 return mIsValid; 176 return mIsValid;
176 } 177 }
177 178
178 /** @return True if this option is editable by users. */ 179 /** @return True if this option is editable by users. */
179 public boolean isEditable() { 180 public boolean isEditable() {
180 return mIsEditable; 181 return mIsEditable;
181 } 182 }
183
184 /** @return True if this option is a payment card. */
185 public boolean isPaymentCard() {
186 return mIsPaymentCard;
187 }
182 } 188 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698