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

Unified Diff: chrome/renderer/autofill_helper.h

Issue 4591001: Display a warning when autofill is disabled for a website. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Compile on ChromeOS... Created 10 years, 1 month 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/common/render_messages_internal.h ('k') | chrome/renderer/autofill_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/autofill_helper.h
diff --git a/chrome/renderer/autofill_helper.h b/chrome/renderer/autofill_helper.h
index c85972515ca58f080193083ac25e6d8bf6a0bcbe..13e7ab789d8f5990a4fd87115218a340513fd30b 100644
--- a/chrome/renderer/autofill_helper.h
+++ b/chrome/renderer/autofill_helper.h
@@ -32,8 +32,10 @@ class AutoFillHelper : public PageClickListener {
explicit AutoFillHelper(RenderView* render_view);
// Queries the browser for Autocomplete and AutoFill suggestions for the given
- // |node|.
- void QueryAutoFillSuggestions(const WebKit::WebNode& node);
+ // |node|. If |autofill_disabled| is true, the query is guaranteed to return
+ // no results, but might return a descriptive warning message.
+ void QueryAutoFillSuggestions(const WebKit::WebNode& node,
+ bool autofill_disabled);
// Removes the Autocomplete suggestion |value| for the field named |name|.
void RemoveAutocompleteSuggestion(const WebKit::WebString& name,
@@ -107,9 +109,14 @@ class AutoFillHelper : public PageClickListener {
// when |element| contains no text.
// |requires_caret_at_end| specifies whether suggestions should be shown when
// the caret is not after the last character in |element|.
+ // |display_warning_if_disabled| specifies whether a warning should be
+ // displayed to the user if AutoFill has suggestions available, but cannot
+ // fill them because it is disabled (e.g. when trying to fill a credit card
+ // form on a non-secure website).
void ShowSuggestions(const WebKit::WebInputElement& element,
bool autofill_on_empty_values,
- bool requires_caret_at_end);
+ bool requires_caret_at_end,
+ bool display_warning_if_disabled);
// Queries the AutoFillManager for form data for the form containing |node|.
// |value| is the current text in the field, and |unique_id| is the selected
@@ -134,6 +141,9 @@ class AutoFillHelper : public PageClickListener {
// The node corresponding to the last request sent for form field AutoFill.
WebKit::WebNode autofill_query_node_;
+ // Whether autofill is disabled for |autofill_query_node_| by the website.
+ bool autofill_disabled_;
+
// The action to take when receiving AutoFill data from the AutoFillManager.
AutoFillAction autofill_action_;
« no previous file with comments | « chrome/common/render_messages_internal.h ('k') | chrome/renderer/autofill_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698