summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autofill_manager.h
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-09 22:00:21 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-09 22:00:21 +0000
commit8d3347feb74ff61582d42b214365664ecc41c775 (patch)
tree300f42cdb3c7f0de84241fa72b8e8e07735e7cc1 /chrome/browser/autofill_manager.h
parent8f27da1f873a11a7900ef2735967cec1a2291a79 (diff)
downloadchromium_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.h')
-rw-r--r--chrome/browser/autofill_manager.h28
1 files changed, 12 insertions, 16 deletions
diff --git a/chrome/browser/autofill_manager.h b/chrome/browser/autofill_manager.h
index 06320fc..8fa241e 100644
--- a/chrome/browser/autofill_manager.h
+++ b/chrome/browser/autofill_manager.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -7,6 +7,7 @@
#include <string>
+#include "chrome/browser/renderer_host/render_view_host_delegate.h"
#include "chrome/browser/webdata/web_data_service.h"
#include "chrome/common/pref_member.h"
@@ -19,7 +20,8 @@ class TabContents;
// Per-tab autofill manager. Handles receiving form data from the renderer and
// the storing and retrieving of form data through WebDataService.
-class AutofillManager : public WebDataServiceConsumer {
+class AutofillManager : public RenderViewHostDelegate::Autofill,
+ public WebDataServiceConsumer {
public:
explicit AutofillManager(TabContents* tab_contents);
virtual ~AutofillManager();
@@ -28,20 +30,14 @@ class AutofillManager : public WebDataServiceConsumer {
Profile* profile();
- // Called when a form is submitted (i.e. when the user hits the submit button)
- // to store the form entries in the profile's sql database.
- void AutofillFormSubmitted(const webkit_glue::AutofillForm& form);
-
- // Starts a query into the database for the values corresponding to name.
- // OnWebDataServiceRequestDone gets called when the query completes.
- void FetchValuesForName(const std::wstring& name,
- const std::wstring& prefix,
- int limit,
- int64 node_id,
- int request_id);
-
- // Removes the specified name/value pair from the database.
- void RemoveValueForName(const std::wstring& name, const std::wstring& value);
+ // RenderViewHostDelegate::Autofill implementation.
+ virtual void AutofillFormSubmitted(const webkit_glue::AutofillForm& form);
+ virtual void GetAutofillSuggestions(const std::wstring& name,
+ const std::wstring& prefix,
+ int64 node_id,
+ int request_id);
+ virtual void RemoveAutofillEntry(const std::wstring& name,
+ const std::wstring& value);
// WebDataServiceConsumer implementation.
virtual void OnWebDataServiceRequestDone(WebDataService::Handle h,