Chromium Code Reviews| 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. |
|
blundell
2014/04/10 08:03:40
nit: I would leave out this comment. The translati
Evan Stade
2014/04/10 16:38:58
I think it serves a purpose: to make sure the read
Dan Beam
2014/04/10 17:06:15
also consider doing a COMPILE_ASSERT() like we do
|
| + enum RequestAutocompleteResult { |
| + AutocompleteResultSuccess, |
| + AutocompleteResultErrorDisabled, |
| + AutocompleteResultErrorCancel, |
| + AutocompleteResultErrorInvalid, |
| + // TODO(estade): add this one to WebFormElement::AutocompleteResult. |
| + AutocompleteResultErrorUnsupported, |
|
Dan Beam
2014/04/09 23:20:05
ah, here's where you got/agreed on this:
https://w
|
| + }; |
| + |
| + 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 |