| OLD | NEW |
| 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 java.util.ArrayList; | 7 import java.util.ArrayList; |
| 8 import java.util.List; | 8 import java.util.List; |
| 9 | 9 |
| 10 import javax.annotation.Nullable; | 10 import javax.annotation.Nullable; |
| 11 | 11 |
| 12 /** | 12 /** |
| 13 * Representation of an editor layout. Can be used, for example, to edit contact
information. | 13 * Representation of an editor layout. Can be used, for example, to edit payer i
nformation. |
| 14 */ | 14 */ |
| 15 public class EditorModel { | 15 public class EditorModel { |
| 16 private final String mTitle; | 16 private final String mTitle; |
| 17 private final List<EditorFieldModel> mFields; | 17 private final List<EditorFieldModel> mFields; |
| 18 @Nullable private Runnable mDoneCallback; | 18 @Nullable private Runnable mDoneCallback; |
| 19 @Nullable private Runnable mCancelCallback; | 19 @Nullable private Runnable mCancelCallback; |
| 20 | 20 |
| 21 /** | 21 /** |
| 22 * Constructs an editor model. | 22 * Constructs an editor model. |
| 23 * | 23 * |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 /** | 85 /** |
| 86 * Called when the user clicks "Cancel." Can be called only once. If this me
thod is called, then | 86 * Called when the user clicks "Cancel." Can be called only once. If this me
thod is called, then |
| 87 * done() should not be called. | 87 * done() should not be called. |
| 88 */ | 88 */ |
| 89 public void cancel() { | 89 public void cancel() { |
| 90 if (mCancelCallback != null) mCancelCallback.run(); | 90 if (mCancelCallback != null) mCancelCallback.run(); |
| 91 mDoneCallback = null; | 91 mDoneCallback = null; |
| 92 mCancelCallback = null; | 92 mCancelCallback = null; |
| 93 } | 93 } |
| 94 } | 94 } |
| OLD | NEW |