diff options
author | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-24 23:23:16 +0000 |
---|---|---|
committer | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-24 23:23:16 +0000 |
commit | 25bacf3dd25367f130baa92895a0c01c3d1d7e13 (patch) | |
tree | 3cd2ce246d1254ae666dcc46992cb04206e6cb1f /chrome/browser/renderer_host | |
parent | 0452c6e3ee2dcaa67b976398e248a97c59deeede (diff) | |
download | chromium_src-25bacf3dd25367f130baa92895a0c01c3d1d7e13.zip chromium_src-25bacf3dd25367f130baa92895a0c01c3d1d7e13.tar.gz chromium_src-25bacf3dd25367f130baa92895a0c01c3d1d7e13.tar.bz2 |
AutoFill: Don't show labels in the suggestions popup when the user is editing a
field in an auto-filled form.
BUG=47437
TEST=AutoFillManagerTest.GetFieldSuggestionsFormIsAutoFilled
Review URL: http://codereview.chromium.org/2861025
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50782 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/renderer_host')
-rw-r--r-- | chrome/browser/renderer_host/render_view_host.cc | 5 | ||||
-rw-r--r-- | chrome/browser/renderer_host/render_view_host.h | 1 | ||||
-rw-r--r-- | chrome/browser/renderer_host/render_view_host_delegate.h | 7 |
3 files changed, 9 insertions, 4 deletions
diff --git a/chrome/browser/renderer_host/render_view_host.cc b/chrome/browser/renderer_host/render_view_host.cc index fb0788b..8d069de 100644 --- a/chrome/browser/renderer_host/render_view_host.cc +++ b/chrome/browser/renderer_host/render_view_host.cc @@ -1587,13 +1587,14 @@ void RenderViewHost::OnMsgShouldCloseACK(bool proceed) { } void RenderViewHost::OnQueryFormFieldAutoFill( - int query_id, const webkit_glue::FormField& field) { + int query_id, bool form_autofilled, const webkit_glue::FormField& field) { RenderViewHostDelegate::AutoFill* autofill_delegate = delegate_->GetAutoFillDelegate(); // If the AutoFill delegate has results to return, we don't need any results // from the Autocomplete delegate. if (autofill_delegate && - autofill_delegate->GetAutoFillSuggestions(query_id, field)) { + autofill_delegate->GetAutoFillSuggestions( + query_id, form_autofilled, field)) { return; } diff --git a/chrome/browser/renderer_host/render_view_host.h b/chrome/browser/renderer_host/render_view_host.h index 8619094..1cea762 100644 --- a/chrome/browser/renderer_host/render_view_host.h +++ b/chrome/browser/renderer_host/render_view_host.h @@ -604,6 +604,7 @@ class RenderViewHost : public RenderWidgetHost { const webkit_glue::WebApplicationInfo& info); void OnMsgShouldCloseACK(bool proceed); void OnQueryFormFieldAutoFill(int request_id, + bool form_autofilled, const webkit_glue::FormField& field); void OnRemoveAutocompleteEntry(const string16& field_name, const string16& value); diff --git a/chrome/browser/renderer_host/render_view_host_delegate.h b/chrome/browser/renderer_host/render_view_host_delegate.h index e0deb4a..cf0c9d9 100644 --- a/chrome/browser/renderer_host/render_view_host_delegate.h +++ b/chrome/browser/renderer_host/render_view_host_delegate.h @@ -426,10 +426,13 @@ class RenderViewHostDelegate { // Called to retrieve a list of AutoFill suggestions from the web database // given the name of the field and what the user has already typed in the - // field. Returns true to indicate that + // field. |form_autofilled| is true if the form containing |field| has any + // auto-filled fields. Returns true to indicate that // RenderViewHost::AutoFillSuggestionsReturned has been called. virtual bool GetAutoFillSuggestions( - int query_id, const webkit_glue::FormField& field) = 0; + int query_id, + bool form_autofilled, + const webkit_glue::FormField& field) = 0; // Called to fill the FormData object with AutoFill profile information that // matches the |value|, |label| key. Returns true to indicate that |