From 4d2b6fb574d019dab4080b3713d3d5e5aa0a91bd Mon Sep 17 00:00:00 2001
From: "jcampan@chromium.org"
 <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Date: Fri, 20 Mar 2009 22:28:17 +0000
Subject: Pressing the Del key while a item is selected in the autocomplete
 popup deletes that suggestion from the DB.

BUG=6176
TEST=Bring up the autofill popup in a form. Select an item and press the Del key. The item should be removed from the popup and should not show on subsequent autofill popups.
Review URL: http://codereview.chromium.org/42258

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12221 0039d316-1c4b-4281-b951-d872f2087c98
---
 chrome/renderer/render_view.cc | 5 +++++
 chrome/renderer/render_view.h  | 2 ++
 2 files changed, 7 insertions(+)

(limited to 'chrome/renderer')

diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc
index 97c7c37..961c665 100644
--- a/chrome/renderer/render_view.cc
+++ b/chrome/renderer/render_view.cc
@@ -1694,6 +1694,11 @@ void RenderView::QueryFormFieldAutofill(const std::wstring& field_name,
                                               form_field_autofill_request_id_));
 }
 
+void RenderView::RemoveStoredAutofillEntry(const std::wstring& name,
+                                           const std::wstring& value) {
+  Send(new ViewHostMsg_RemoveAutofillEntry(routing_id_, name, value));
+}
+
 void RenderView::OnReceivedAutofillSuggestions(
     int64 node_id,
     int request_id,
diff --git a/chrome/renderer/render_view.h b/chrome/renderer/render_view.h
index ac898bf..b6d48a0 100644
--- a/chrome/renderer/render_view.h
+++ b/chrome/renderer/render_view.h
@@ -155,6 +155,8 @@ class RenderView : public RenderWidget,
   virtual void QueryFormFieldAutofill(const std::wstring& field_name,
                                       const std::wstring& text,
                                       int64 node_id);
+  virtual void RemoveStoredAutofillEntry(const std::wstring& field_name,
+                                         const std::wstring& text);
   virtual void UpdateTargetURL(WebView* webview,
                                const GURL& url);
   virtual void RunFileChooser(bool multi_select,
-- 
cgit v1.1