diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-09 22:00:21 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-09 22:00:21 +0000 |
commit | 8d3347feb74ff61582d42b214365664ecc41c775 (patch) | |
tree | 300f42cdb3c7f0de84241fa72b8e8e07735e7cc1 /chrome/browser/autofill_manager.cc | |
parent | 8f27da1f873a11a7900ef2735967cec1a2291a79 (diff) | |
download | chromium_src-8d3347feb74ff61582d42b214365664ecc41c775.zip chromium_src-8d3347feb74ff61582d42b214365664ecc41c775.tar.gz chromium_src-8d3347feb74ff61582d42b214365664ecc41c775.tar.bz2 |
Move some more interfaces on RenderViewHostDelegate to separate classes. The
ones in the patch are those that are implemented by other classes, avoiding
TabContents pass-throughs.
Review URL: http://codereview.chromium.org/149373
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20324 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autofill_manager.cc')
-rw-r--r-- | chrome/browser/autofill_manager.cc | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/chrome/browser/autofill_manager.cc b/chrome/browser/autofill_manager.cc index 3e87674..08b631e 100644 --- a/chrome/browser/autofill_manager.cc +++ b/chrome/browser/autofill_manager.cc @@ -11,6 +11,10 @@ #include "chrome/common/pref_service.h" #include "webkit/glue/autofill_form.h" +// Limit on the number of suggestions to appear in the pop-up menu under an +// text input element in a form. +static const int kMaxAutofillMenuItems = 6; + // static void AutofillManager::RegisterUserPrefs(PrefService* prefs) { prefs->RegisterBooleanPref(prefs::kFormAutofillEnabled, true); @@ -50,11 +54,10 @@ void AutofillManager::AutofillFormSubmitted(const webkit_glue::AutofillForm& for StoreFormEntriesInWebDatabase(form); } -void AutofillManager::FetchValuesForName(const std::wstring& name, - const std::wstring& prefix, - int limit, - int64 node_id, - int request_id) { +void AutofillManager::GetAutofillSuggestions(const std::wstring& name, + const std::wstring& prefix, + int64 node_id, + int request_id) { if (!*form_autofill_enabled_) return; @@ -70,12 +73,12 @@ void AutofillManager::FetchValuesForName(const std::wstring& name, node_id_ = node_id; request_id_ = request_id; - pending_query_handle_ = web_data_service-> - GetFormValuesForElementName(name, prefix, limit, this); + pending_query_handle_ = web_data_service->GetFormValuesForElementName( + name, prefix, kMaxAutofillMenuItems, this); } -void AutofillManager::RemoveValueForName(const std::wstring& name, - const std::wstring& value) { +void AutofillManager::RemoveAutofillEntry(const std::wstring& name, + const std::wstring& value) { WebDataService* web_data_service = profile()->GetWebDataService(Profile::EXPLICIT_ACCESS); if (!web_data_service) { |