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

Unified Diff: components/autofill/core/browser/autofill_manager_delegate.h

Issue 229723002: Better error reasons for rAc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: android Created 6 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 side-by-side diff with in-line comments
Download patch
Index: components/autofill/core/browser/autofill_manager_delegate.h
diff --git a/components/autofill/core/browser/autofill_manager_delegate.h b/components/autofill/core/browser/autofill_manager_delegate.h
index 2ad85d078ce57785fb307278fbf2ba5bf4b7e14b..7b7ecd2c363931255212b8caf62ebb0b497f6a8b 100644
--- a/components/autofill/core/browser/autofill_manager_delegate.h
+++ b/components/autofill/core/browser/autofill_manager_delegate.h
@@ -43,6 +43,19 @@ struct PasswordForm;
// attached to).
class AutofillManagerDelegate {
public:
+ // Copy of blink::WebFormElement::AutocompleteResult.
+ enum RequestAutocompleteResult {
+ AutocompleteResultSuccess,
+ AutocompleteResultErrorDisabled,
+ AutocompleteResultErrorCancel,
+ AutocompleteResultErrorInvalid,
+ // TODO(estade): add this one to WebFormElement::AutocompleteResult.
+ AutocompleteResultErrorUnsupported,
+ };
+
+ typedef base::Callback<
+ void(RequestAutocompleteResult, const FormStructure*)> ResultCallback;
+
virtual ~AutofillManagerDelegate() {}
// Gets the PersonalDataManager instance associated with the delegate.
@@ -70,7 +83,7 @@ class AutofillManagerDelegate {
virtual void ShowRequestAutocompleteDialog(
const FormData& form,
const GURL& source_url,
- const base::Callback<void(const FormStructure*)>& callback) = 0;
+ const ResultCallback& callback) = 0;
// Shows an Autofill popup with the given |values|, |labels|, |icons|, and
// |identifiers| for the element at |element_bounds|. |delegate| will be

Powered by Google App Engine
This is Rietveld 408576698