Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4207)

Unified Diff: chrome/renderer/render_view.h

Issue 2138005: AutoFill: Preview form field values when the user changes the AutoFill dropdown (Closed)
Patch Set: Rebase. Created 10 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/renderer/form_manager_unittest.cc ('k') | chrome/renderer/render_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/render_view.h
diff --git a/chrome/renderer/render_view.h b/chrome/renderer/render_view.h
index 5da8469ecb7a775e4bb9f7b3d1cfaa796d6eda7b..60eb2a7d255ed9062d8b342ad7b30731a1052a51 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);
};
« no previous file with comments | « chrome/renderer/form_manager_unittest.cc ('k') | chrome/renderer/render_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698