diff options
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, |