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_; |