summaryrefslogtreecommitdiffstats
path: root/chrome/browser/web_contents.cc
diff options
context:
space:
mode:
authorpetersont@google.com <petersont@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-11 01:01:09 +0000
committerpetersont@google.com <petersont@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-11 01:01:09 +0000
commit8d0f15cbef041e318ddf691c1e2cc711c14a160e (patch)
treeeb92487eb0f96ed7d4d398ab0725b867eff0795e /chrome/browser/web_contents.cc
parent621af4ffdbeeaee2785750258d90b096eb6c7551 (diff)
downloadchromium_src-8d0f15cbef041e318ddf691c1e2cc711c14a160e.zip
chromium_src-8d0f15cbef041e318ddf691c1e2cc711c14a160e.tar.gz
chromium_src-8d0f15cbef041e318ddf691c1e2cc711c14a160e.tar.bz2
Review URL: http://codereview.chromium.org/10005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5151 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/web_contents.cc')
-rw-r--r--chrome/browser/web_contents.cc11
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,