diff options
author | petersont@google.com <petersont@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-08 02:13:09 +0000 |
---|---|---|
committer | petersont@google.com <petersont@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-08 02:13:09 +0000 |
commit | d893ab9643e5284db08087bc7514f59e37d6b319 (patch) | |
tree | 862077a3e8acbb010157f8c3bdd45e95d7e40ecb /chrome/browser/web_contents.cc | |
parent | bab654788c013d4cdf3900fc43927e159362b5ed (diff) | |
download | chromium_src-d893ab9643e5284db08087bc7514f59e37d6b319.zip chromium_src-d893ab9643e5284db08087bc7514f59e37d6b319.tar.gz chromium_src-d893ab9643e5284db08087bc7514f59e37d6b319.tar.bz2 |
Entries in a form get recorded when the user submits the form. Database and pop-up menu talk to each other. Pop-up menu appears containing suggestions.
Review URL: http://codereview.chromium.org/9462
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5058 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/web_contents.cc')
-rw-r--r-- | chrome/browser/web_contents.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/chrome/browser/web_contents.cc b/chrome/browser/web_contents.cc index 0c37ae0..acd9338 100644 --- a/chrome/browser/web_contents.cc +++ b/chrome/browser/web_contents.cc @@ -134,8 +134,13 @@ const wchar_t* kPrefsToObserve[] = { // no font is specified or a CSS generic family (serif or sans-serif) // is not specified. }; + const int kPrefsToObserveLength = arraysize(kPrefsToObserve); +// Limit on the number of suggestions to appear in the pop-up menu under an +// text input element in a form. +const int kMaxAutofillMenuItems = 6; + void InitWebContentsClass() { static bool web_contents_class_initialized = false; if (!web_contents_class_initialized) { @@ -1131,6 +1136,12 @@ void WebContents::AutofillFormSubmitted( GetAutofillManager()->AutofillFormSubmitted(form); } +void WebContents::GetAutofillSuggestions(const std::wstring& field_name, + const std::wstring& user_text, int64 node_id, int request_id) { + GetAutofillManager()->FetchValuesForName(field_name, user_text, + kMaxAutofillMenuItems, node_id, request_id); +} + // Checks to see if we should generate a keyword based on the OSDD, and if // necessary uses TemplateURLFetcher to download the OSDD and create a keyword. void WebContents::PageHasOSDD(RenderViewHost* render_view_host, |