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

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

Issue 2163693002: [Merge M-53] Credit card editor for PaymentRequest UI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: Created 4 years, 5 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/Validatable.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/Validatable.java b/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/Validatable.java
new file mode 100644
index 0000000000000000000000000000000000000000..3f5dd0fe03ee779c5c5798c3192a863123e8d294
--- /dev/null
+++ b/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/Validatable.java
@@ -0,0 +1,21 @@
+// 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.payments.ui;
+
+/** The interface for editor fields that handle validation and display of errors. */
+interface Validatable {
+ /**
+ * Updates the error display.
+ *
+ * @param showError If true, displays the error message. If false, clears it.
+ */
+ void updateDisplayedError(boolean showError);
+
+ /** @return True if this field is valid. */
+ boolean isValid();
+
+ /** Scrolls to and focuses the field to bring user's attention to it. */
+ void scrollToAndFocus();
+}

Powered by Google App Engine
This is Rietveld 408576698