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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/payments/ui/EditorModel.java

Issue 2093363002: Autofill address editor in PaymentRequest UI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@contact-editor
Patch Set: Fix try-bot Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/android/java/src/org/chromium/chrome/browser/payments/ui/EditorModel.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/EditorModel.java b/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/EditorModel.java
index ca423c18660526e4b9d61391c158e2c009b85088..e96a3922a371c42c4ee2892f66727e86c22cf578 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/EditorModel.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/EditorModel.java
@@ -48,6 +48,13 @@ public class EditorModel {
}
/**
+ * Removes all fields from the editor. The field contents are not altered.
+ */
+ public void removeAllFields() {
+ mFields.clear();
+ }
+
+ /**
* Specifies the callback to invoke when the user clicks "Done."
*
* @param callback The callback to invoke when the user clicks "Done."
@@ -66,7 +73,8 @@ public class EditorModel {
}
/**
- * Called when the user clicks "Done."
+ * Called when the user clicks "Done." Can be called only once. If this method is called, then
+ * cancel() should not be called.
*/
public void done() {
if (mDoneCallback != null) mDoneCallback.run();
@@ -75,7 +83,8 @@ public class EditorModel {
}
/**
- * Called when the user clicks "Cancel."
+ * Called when the user clicks "Cancel." Can be called only once. If this method is called, then
+ * done() should not be called.
*/
public void cancel() {
if (mCancelCallback != null) mCancelCallback.run();

Powered by Google App Engine
This is Rietveld 408576698