diff options
author | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-02 19:05:18 +0000 |
---|---|---|
committer | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-02 19:05:18 +0000 |
commit | 18ca9a6b5204d915324ea5a8903593e06e81562b (patch) | |
tree | dec993bd8ca4c5138b3c1cf8c737512bb341863e /chrome/renderer/render_view.h | |
parent | 286e660b3175cf308d0c76e38392aa05b9b21c9a (diff) | |
download | chromium_src-18ca9a6b5204d915324ea5a8903593e06e81562b.zip chromium_src-18ca9a6b5204d915324ea5a8903593e06e81562b.tar.gz chromium_src-18ca9a6b5204d915324ea5a8903593e06e81562b.tar.bz2 |
AutoFill: Preview form field values when the user changes the AutoFill dropdown
selection. Refactor form field enumeration into ForEachMatchingFormField().
BUG=38582
TEST=FormManagerTest.PreviewForm
Review URL: http://codereview.chromium.org/2138005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48746 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/render_view.h')
-rw-r--r-- | chrome/renderer/render_view.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/chrome/renderer/render_view.h b/chrome/renderer/render_view.h index 5da8469..60eb2a7 100644 --- a/chrome/renderer/render_view.h +++ b/chrome/renderer/render_view.h @@ -282,6 +282,11 @@ class RenderView : public RenderWidget, const WebKit::WebNode& node, const WebKit::WebString& value, const WebKit::WebString& label); + virtual void didSelectAutoFillSuggestion( + const WebKit::WebNode& node, + const WebKit::WebString& value, + const WebKit::WebString& label); + virtual void didClearAutoFillSelection(const WebKit::WebNode& node); virtual WebKit::WebNotificationPresenter* GetNotificationPresenter() { return notification_provider_.get(); @@ -571,6 +576,12 @@ class RenderView : public RenderWidget, typedef std::map<GURL, ContentSettings> HostContentSettings; typedef std::map<GURL, int> HostZoomLevels; + enum AutoFillAction { + AUTOFILL_NONE, // No state set. + AUTOFILL_FILL, // Fill the AutoFill form data. + AUTOFILL_PREVIEW, // Preview the AutoFill form data. + }; + explicit RenderView(RenderThreadBase* render_thread, const WebPreferences& webkit_preferences, int64 session_storage_namespace_id); @@ -929,6 +940,15 @@ class RenderView : public RenderWidget, WebKit::WebFrame* frame, WebKit::WebNavigationType type); + // Queries the AutoFillManager for form data for the form containing |node|. + // |value| is the current text in the field, and |label| is the selected + // profile label. |action| specifies whether to Fill or Preview the values + // returned from the AutoFillManager. + void QueryAutoFillFormData(const WebKit::WebNode& node, + const WebKit::WebString& value, + const WebKit::WebString& label, + AutoFillAction action); + // Bitwise-ORed set of extra bindings that have been enabled. See // BindingsPolicy for details. int enabled_bindings_; @@ -1221,6 +1241,9 @@ class RenderView : public RenderWidget, PepperPluginDelegateImpl pepper_delegate_; + // The action to take when receiving AutoFill data from the AutoFillManager. + AutoFillAction autofill_action_; + DISALLOW_COPY_AND_ASSIGN(RenderView); }; |