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

Unified Diff: components/autofill/core/browser/autofill_external_delegate.cc

Issue 148413002: Add "previewing on hover" support for single-field autocomplete input (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update code as per review comments Created 6 years, 10 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_external_delegate.cc
diff --git a/components/autofill/core/browser/autofill_external_delegate.cc b/components/autofill/core/browser/autofill_external_delegate.cc
index c4367567ff274c7801e20dea6ef5f0dd89111e21..6dde33d468d9b13016a95e0bec3fb867ecadd6b0 100644
--- a/components/autofill/core/browser/autofill_external_delegate.cc
+++ b/components/autofill/core/browser/autofill_external_delegate.cc
@@ -164,12 +164,18 @@ bool AutofillExternalDelegate::ShouldRepostEvent(const ui::MouseEvent& event) {
return true;
}
-void AutofillExternalDelegate::DidSelectSuggestion(int identifier) {
+void AutofillExternalDelegate::DidSelectSuggestion(int identifier,
+ const base::string16& value)
+{
Ilya Sherman 2014/02/22 05:59:51 nit: The curly brace should be on the previous lin
ziran.sun 2014/02/27 15:38:11 Done.
ClearPreviewedForm();
// Only preview the data if it is a profile.
if (identifier > 0)
FillAutofillFormData(identifier, true);
+ // Preview Autocomplete field
Ilya Sherman 2014/02/22 05:59:51 nit: This comment is redundant with the code; plea
+ else if (identifier == WebAutofillClient::MenuItemIDAutocompleteEntry) {
+ autofill_driver_->RendererShouldPreviewAutoCompleteNode(value);
+ }
Ilya Sherman 2014/02/22 05:59:51 nit: No need for curly braces.
ziran.sun 2014/02/27 15:38:11 Done.
}
void AutofillExternalDelegate::DidAcceptSuggestion(const base::string16& value,

Powered by Google App Engine
This is Rietveld 408576698