summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autofill_manager.h
diff options
context:
space:
mode:
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,